Important alert: (current site time 7/15/2013 6:15:31 PM EDT)
 

winzip icon

DFS (Data and File structure) Programs

Email
Submitted on: 4/17/2006 3:01:06 AM
By: Divyen Patel  
Level: Beginner
User Rating: By 12 Users
Compatibility: C++ (general)
Views: 30894
(About the author)
 
     Data and File structure Programs Program Set 1 ------------------------------------------------- 1. Perform the following operations on an array: (a) insert (b) delete (c) merge (D) Delete multiple occurrences of a number ------------------------------------------------- 2. Create a stack using static memory allocation ------------------------------------------------- 3. Create a queue using static memory allocation ------------------------------------------------- 4. Create a circular queue ------------------------------------------------- 5. Create a singly linked list and perform the following operations: (a) insert (b) delete (c) merge (d) sort (e) union (f) intersection (g) reverse ------------------------------------------------- 6. Create a stack using dynamic memory allocation ------------------------------------------------- 7. Create a queue using dynamic memory allocation ------------------------------------------------- 8. Represent a polynomial in terms of a singly linked list, and then add two three variables polynomials ------------------------------------------------- 9. Create a doubly linked list ------------------------------------------------- 10. Create a circular linked list ------------------------------------------------- 12. Create a double-ended queue (Dequeue) with the following operations: (a) insert in the beginning (b) insert in the end (c) delete from beginning (d) delete from end Hint: Use doubly-link list ------------------------------------------------- 13. Create a Priority Queue with the following operations: (a) Insert (b) DeleteMin() / deleteMax---depending on the heap ------------------------------------------------- Program Set 2 ------------------------------------------------- 1.Trace the following set of nos using quick sort and bubble sort. Which of the sorting method is more efficient? 9, 11, 1, 5, 10, 45, 3, 8, 18 ------------------------------------------------- 2. Code for finding a no in a binary search tree and displaying its level where it is found (root is at zero level) ------------------------------------------------- 3. Code for traversing a binary tree in inorder iteratively ------------------------------------------------- 4. Code for interchanging the left and right subtrees of a binary tree ------------------------------------------------- 5. Code for counting the leaves(node having no subtree) of the tree Note: Q-2 to Q-5 are to be implemented practically also. ------------------------------------------------- 6. Heap Sort -------------------------------------------------
 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 4 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Beginner category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments

4/17/2006 9:43:12 AMManas Ranjan Sahu

A very nice collection of data structure programs.
(If this comment was disrespectful, please report it.)

 
4/21/2006 9:29:22 AMRavimintu

Thanks for sharing. 5 from me !!!
(If this comment was disrespectful, please report it.)

 
4/23/2006 12:57:45 AMArjun Pakrashi

U R GR8

Arjun Pakrashi
[India]
(If this comment was disrespectful, please report it.)

 
12/8/2006 9:59:49 AMSelman

Excellent work .. Very useful sharing
Thanks to author
(If this comment was disrespectful, please report it.)

 
5/25/2007 1:06:06 PMPaul

Hi. I have a problem with C program. I have to make a database (using structures). I've done almost everything, but there's one thing lelf- searching with "*" and "?" signs. "*" should replace random string chain and "?"- random sign.
E.g.- "S*" should find each word, witch starts on S.
How to do this? Please, help me...
(If this comment was disrespectful, please report it.)

 
4/22/2012 12:08:22 PMD

Program 13, for the priority_queue, is missing from the file.
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.