Learn how to a build a cloud-first strategyRegister Now


data structure for timetabling problem

Posted on 2006-04-05
Medium Priority
Last Modified: 2010-03-31
hi experts,
what would be the most efficient data structure for timetabling question?

cheers r6
Question by:R6
LVL 92

Accepted Solution

objects earned 100 total points
ID: 16389356
Perhaps a SortedMap<Calendar, TimetableEntry>

Author Comment

ID: 16389414
hi objects,
thanks for ur comment, i have never used Sortedmap before, so i'll look into it now:)

by the way, my current implementation is such, i have a uesr-defined class that represents a class that has to be scheduled in.  as each class has different contact hours and the enrolled students and so on.  therefore, i have an arraylist of arraylist to first sort out the allowed timeframe (hours by day)  and from there i build a domain_list (arraylist) which holds the possible time for this particular class.  then i begin my scheduling algorithm based on this domain_list structure.

can u please comment about my implementation.

p.s i have increased the point value to 50 to cover this extra question:)


LVL 30

Assisted Solution

by:Mayank S
Mayank S earned 100 total points
ID: 16392152
>> i have a uesr-defined class that represents a class that has to be scheduled in

That would probably be equivalent of the TimeTableEntry class that objects has defined.

>> i have an arraylist of arraylist to first sort out the allowed timeframe and from there i build a domain_list

Well, I would probably make:

SortedMap <Calendar, List> where the list holds multiple time-table entries which have to be processed together at this time (if there are any such cases).

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Suggested Courses
Course of the Month20 days, 23 hours left to enroll

810 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