Solved

keyword grouping search

Posted on 1998-07-29
7
211 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
7 Comments
 
LVL 11

Expert Comment

by:alexo
Comment Utility
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
Comment Utility
Why do you reject alexos answer? Pls give more info what you want to do!
0
 
LVL 11

Expert Comment

by:alexo
Comment Utility
Yea, mabo, your chances of getting a good answer will be much better if you explain what's wrong with the proposed ones.
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 

Author Comment

by:mabo
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
xyu, email at Cobra__77@hotmail.com and I will send you more details.
Thanks
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Want to delete all my personal data 13 126
distributed computing in Python 4 99
List out all word 7 219
sameEnds challenge 3 105
An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
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…
The goal of this video is to provide viewers with basic examples to understand and use pointers in the C programming language.
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now