Solved

keyword grouping search

Posted on 1998-07-29
7
244 Views
Last Modified: 2010-04-15
can someone suggest a data structure for a keyword grouping or search?
say eg I have 500-600 students and each student is interested in one or more sports...I want to group keywords (ie sport name ) to find all those students who are interested in similar sports...

I think it is similar to a library search ...when we want to do a keyword search for a book....

any suggestions.....
0
Comment
Question by:mabo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 11

Expert Comment

by:alexo
ID: 1251875
Well, an associative array with the sprts name as an index and a linked list of pointers (or indexes) to students seems to fit the bill.

An associative array can be eiifciently implemented using a hash table.
0
 
LVL 10

Expert Comment

by:rbr
ID: 1251876
Why do you reject alexos answer? Pls give more info what you want to do!
0
 
LVL 11

Expert Comment

by:alexo
ID: 1251877
Yea, mabo, your chances of getting a good answer will be much better if you explain what's wrong with the proposed ones.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:mabo
ID: 1251878
associative array is too complicated (at least for me) in  C.
associative array is easy in Perl ... but I perfer C, hence posting this question in C area.

I will appreciate any other comments or suggestions.
0
 
LVL 11

Expert Comment

by:alexo
ID: 1251879
What's so complicated about a hash table (the most common implementation of an associative array)?
0
 
LVL 3

Accepted Solution

by:
xyu earned 200 total points
ID: 1251880
ok... lets do this... if number of sprots kind isn't big like 32 kind of sports o something You can give to each sport an Id from 1 to 32 or 64 of 128.... then You transfering set of the sports into bit mask ... and search though a list of the students using bitwize & or something to check the sprts set they are interesting... I can give You a source if You can give more details :)
Meanwile: If You can use C++ You can use STL classes or go to http:\\come.to\okthinks and download Natlib Template Library and use some complex data structures..
Note: for this number of entities the bitwize solution will be faster because it can be performed almoust without pointers operation memory allocation and hash calculation... etc using the basic CPU instruction only :)

0
 

Author Comment

by:mabo
ID: 1251881
xyu, email at Cobra__77@hotmail.com and I will send you more details.
Thanks
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question