“I bought this guide a few days ago to prepare for my interview with Oracle. Many of the questions they asked me were from this guide. I found this book absolutely great!”
This question is open ended , though Microsoft might be testing fundamentals on Binary search , Indexing etc by asking this.
The approach I would take is , check out the index cards and find the shelf where the book is located.
then do an alphabetical search by physically going to that shelf. You can also saythat you would start on the top of the shelf or the bottom depending on the “letter” anme of the book etc.
Check the Shelves randomly and pick the clue aboyt alphabetical arrangement of the books. Take any Shelf and pick the clue about top-down Indexing within alphabates.
If you don’t have a card catalog or a lilbrarian to help, I think that you should go through the library and try to figure out how the books are organized. Start at one shelf and see if the books are organized by author, date of publication, subject, etc. That can get you started in the right direction.
Method 1 : Do a linear search starting from the start till the end to get to our book.
Method 2: Spread a rumour that the book had a Rs.1000/- note in it. Then go next day and pick up the book from the library reception.
Method 3: Pray to ur favourite God and go to the rack guided by ur instinctive feeling and pick the book.
first do a categorical search linearly. within that, figure out the way books are sorted. if more than a shelf, binary search to get to the exact shelf and then a ternary search in that particular shelf
Generally libraries follow the dewy decimal system… but you will have to find the type of book you are standing at, and then check how close/far you are from your concerned type.. then do a physical scan of each book… well, the dewy decimal system is a bit unfair for technology, but its allrite
1) Go to one shelf and get the idea,how books are arranged: according to alphabetical order of titles, authors, Category etc..
2) After getting the idea of possible organization, Go to the shelves located at 4 corners of the room and you can narrow down your search to the shelves between the two of the corners.
3) Further narrow down your search by searching the book in the 4 corners of a shelf and finding the apporximate location.
Here assumption is that books are arranged in a particular pattern.
If the library is REAL BIG…
Find out a Spatial Index, wherein 3-5 contigously kept books from any random shelf be picked up & checked whether there is any sort of relationship among them (viz. Type of literature, alaphabetic, year of publish, author etc.).
With the knowledge of this new Index, test it on a couple of more shelfs from different spatially away from the original one & correct it if needed.
This Index can then be used for finding out the book.
This question is open ended , though Microsoft might be testing fundamentals on Binary search , Indexing etc by asking this.
The approach I would take is , check out the index cards and find the shelf where the book is located.
then do an alphabetical search by physically going to that shelf. You can also saythat you would start on the top of the shelf or the bottom depending on the “letter” anme of the book etc.
I would leave the library, drive to the exact location of the person who wrote this question, and slap them.
An indexed search, or a hashing table search, or even a rational search would do !
Check the Shelves randomly and pick the clue aboyt alphabetical arrangement of the books. Take any Shelf and pick the clue about top-down Indexing within alphabates.
If you don’t have a card catalog or a lilbrarian to help, I think that you should go through the library and try to figure out how the books are organized. Start at one shelf and see if the books are organized by author, date of publication, subject, etc. That can get you started in the right direction.
Method 1 : Do a linear search starting from the start till the end to get to our book.
Method 2: Spread a rumour that the book had a Rs.1000/- note in it. Then go next day and pick up the book from the library reception.
Method 3: Pray to ur favourite God and go to the rack guided by ur instinctive feeling and pick the book.
Humans are best at heuristics…..
I would see the organization.. by letter/area of interest/ type etc…. and then narrow down where i can find it best.
And then look only in that spot.
first do a categorical search linearly. within that, figure out the way books are sorted. if more than a shelf, binary search to get to the exact shelf and then a ternary search in that particular shelf
Generally libraries follow the dewy decimal system… but you will have to find the type of book you are standing at, and then check how close/far you are from your concerned type.. then do a physical scan of each book… well, the dewy decimal system is a bit unfair for technology, but its allrite
we can search the shelfs like same category and keep it.
Follow these steps.
1) Go to one shelf and get the idea,how books are arranged: according to alphabetical order of titles, authors, Category etc..
2) After getting the idea of possible organization, Go to the shelves located at 4 corners of the room and you can narrow down your search to the shelves between the two of the corners.
3) Further narrow down your search by searching the book in the 4 corners of a shelf and finding the apporximate location.
Here assumption is that books are arranged in a particular pattern.
before putting the book randomly ……incorporate an GPS locator in the Book….now place the book anywhere u want..tracking is of bed of roses
Uh,,,It says “book” not a particular book… Just find the nearest book and say “I found a book”. Problem Solved
Mainly two solutions:
1. Trying to assess the degree and type of book positions
2. Ask other people in the library
2a. Best choice people reading in the library (=frequent visitors)
If the library is REAL BIG…
Find out a Spatial Index, wherein 3-5 contigously kept books from any random shelf be picked up & checked whether there is any sort of relationship among them (viz. Type of literature, alaphabetic, year of publish, author etc.).
With the knowledge of this new Index, test it on a couple of more shelfs from different spatially away from the original one & correct it if needed.
This Index can then be used for finding out the book.
This is what a human would do subconciuosly…
first is…
differentiate small and big books
then…
do a binary search according to the letter that starts the title of the book..
Leave an Answer/Comment