Re: [algogeeks] Which Data Structure to use

2014-04-15 Thread Narsimha Raju
Hi Abhay, Thanks for your solution, seems good as it is covering all the 3 attributes. Nesting of Hashmap to 3 layers is little clumsy. For Example if we increase from 3 to 4 attributes we can see the complexity of handling the things. I would like to know, do we have any other solutions.

Re: [algogeeks] Which Data Structure to use

2014-04-15 Thread Abhay Prakash
Probably you can make separate *multimap *for each of the attribute and while retrieval, taking intersection of sets associated with each of the attribute. The three tables could be: multimapstring, yourResultDataType contentsContainingTopic; multimapstring, yourResultDataType

Re: [algogeeks] Which Data Structure to use

2014-04-13 Thread Abhay Prakash
Use a B-Tree implemented using nested map as: *mapstring, mapstring, mapstring, yourResultDataType table;* Now for each level the complexity will be log(numOfElementsAtThatLevel). e.g.* if you have all three parameters, the complexity of retrieval will be

Re: [algogeeks] Which Data Structure to use

2014-04-13 Thread Abhay Prakash
I think there is a correction for the time complexities: For the case when all three parameters are given, the time complexity will be *O(log(numTopics) + log(numLocations) + log(numLocale)). *Reason being it is like search on three different trees - after the key *topicValue* has been searched,

[algogeeks] Which Data Structure to use

2014-04-10 Thread Narsimha Raju
Hi, I have a question and i would like to know the data structure to be used for this. ​You have 3 attribute 1. Topic 2. Location 3. Locale User can give any of the three or all the them to retrieve the content. For example. 1. Politics, Hyderabad, English In this case we

Re: [algogeeks] Which data structure to use in searching a list for information about - -

2012-04-10 Thread Rose
Thanks Bharat and Ashish; Sorry my knowledge is so basic, I'm not yet with you. The example they gave was: % film.txt ... Tin men (1987) / DeBoy, David/Blumenfeld, Alan/ --- /Geppi, Cindy/Hershey, Barbara Titanic (1997) /Mazin, Stan/...DiCaprio, Leonardo/.../Winslet, Kate/... To Die For

Re: [algogeeks] Which data structure to use in searching a list for information about - -

2012-04-09 Thread Ashish Goel
dual key hashmap actor,film Best Regards Ashish Goel Think positive and find fuel in failure +919985813081 +919966006652 On Sun, Apr 8, 2012 at 2:37 PM, bharat b bagana.bharatku...@gmail.comwrote: Maintain an vector of structure Film_actors for List of actors Maintain an vector of structure

[algogeeks] Which data structure to use in searching a list for information about - -

2012-04-06 Thread Rose
Thanks all of you. I'm new to algorithms and data structure and I'm new in this forum. I have an assignment but not sure yet: A. Describe a data structure which can effectively answer the following questions: 1. A list of actors (f) : Print a list of actors who took part in film* f * . 2. A list

[algogeeks] which data structure?

2008-06-30 Thread Vandana
Hello All, I would like to implement a tree with the following properties. 1. The tree is balanced. 2. Each node has a max of 7 sub nodes and min of ceil(7/2) sub nodes. 3. Number of nodes known from the beginning. How would I implement this? Is there a data structure that I can use? Consider