Solved

keyword grouping search

Posted on 1998-07-29
7
248 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
[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

 

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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.
Suggested Courses

631 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