varun_agg
BAN USER
Comments (5)
Reputation 5
Page:
1
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
0
of 0 vote
Indexing is a method of finding a data in a big table or file. On the basis of the key, indexes provide a quicker way to reach the block in which corresponding data can be found.
Concept of DataBase.
For eg. if ur key is a number, u can maintain index on highest significant 3 bits. So when u need to access the data, simple operation on key and lookup(generally Random access) of Index gives you the block containing data.
Comment hidden because of low score. Click to expand.
0
of 0 vote
A small optimization:
If the numbers are too large, product for all of them may overflow. We can keep product of (n-1) first and hen traverse. For each element first divide the product by a[i] and then multiply by a[i-1].
As for zeros are concerned, we can handle them separately.
Comment hidden because of low score. Click to expand.
Page:
1
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
@Sam
- varun_agg June 13, 2008In this case the node with value 3 would not be like a node of Singly linked list. Either 3's next can be 5 or NULL, but not both.