By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,375 Members | 3,001 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,375 IT Pros & Developers. It's quick & easy.

Create linked list, queue, and stack implementations in C++

P: 1
[Q1]
Create a linked list data structure library to hold strings. Then library should support the following linked list operations.
Create() Creates the linked list
Insert() Insert a string into the linked list
Delete() Deletes a string from the linked list
Search() Search for a string and return 1 if found otherwise return 0.
isEmpty() Returns 1 if the list is empty and 0 otherwise.
Display() Display all the strings in the list.

Modify the above library to hold structures containing the name, serial number(the "E/04/"part is omitted) and date of birth of students. Using the modified library create a simple interface for adding, removing & displaying entries.
Use a selection method of your choise to sort the list according to the serial number before the displaying it on the screen. (Swapping elements within a list can be archived by adjusting the next pointer of each element)


[Q2]
Create a stack data structure library (use linked list). Using the library write a program which does the following,
Takes an infix expression as input
Converts the infix expression to a postfix expression
Evaluates the postfix expression

[Q3]
Create two queue data structure libraries. One should be implemented using an array, the other should be implemented using pointers.
Each should support the following operations
Insert Inserts a new item to the queue
Delete Deletes the front most item from the queue

Create two small programs to enter numbers into a queue and delete them. (make use of both of the above libraries)
Sep 18 '07 #1
Share this Question
Share on Google+
1 Reply


gpraghuram
Expert 100+
P: 1,275
HI,
Dont post blindly like this.
Read the posting guidelines before posting ur question.
Thanks
Raghuram
Sep 18 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.