473,394 Members | 1,916 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

help I have an exm tommorow

plz help me in this Q

Write a menu driven C program which allows to:

Build a max heap from the user input (the input is an array of integers).
Insert a new element in the max heap.
Search a specific element in the max heap.
Delete an element from the max heap.
Sort the user input based on the max heap concept.
Merge two max heaps where the two max heaps are built from the user input.
Display a max heap in the screen as a tree representation.
Dec 21 '09 #1
2 1607
RRick
463 Expert 256MB
You need to work out the design yourself, but the above description has broken the problem into its pieces. That's a good place to start.

If you can use C++, then I suggest you use the STL vector object. It has built in methods for managing elements. There are also STL algorithms for sorting and merging vectors.
Dec 21 '09 #2
MyRedz
17
you can also use stacks and queues
there are in the data structure part of c++
Dec 24 '09 #3

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

Similar topics

21
by: Dave | last post by:
After following Microsofts admonition to reformat my system before doing a final compilation of my app I got many warnings/errors upon compiling an rtf file created in word. I used the Help...
46
by: Kingdom | last post by:
In my data base I have a list of componet types e.g. type A - I have 8 off - type B I have 12 off etc. I'm using Set objRS = objDC.Execute("Select DISTINCT Component_Type FROM Parts_Table") ...
4
by: Kain0o0 | last post by:
Hello , thanks for any help in advance. Im writing some code for a c++ class and the proffessor wants us to implement a list template using arrays. I thought this would be an easy task but have...
5
by: Matik | last post by:
Hello, I've very often a deadlock problem. The deadlock is generated always in the same way, by one application calling in DB two sp's (application has two threads). This is an error message...
3
by: Zmakhu | last post by:
hi ... I have a problem. and deadline is tommorow ... (my own fault) I'm solving missionaries and cannibals problem in c++, with threads. I need an infinite loop. I chose while. The problem is,...
2
by: chrisb1586 | last post by:
Hey guys I have no idea with what im doing with loops( a for, do, or while loop any of the 3) or the logic on how to do this and i have to have this done for school tommorow. I have to create a...
4
H0kage
by: H0kage | last post by:
I am Suppose To Create A Program That We Enter A Number Of Seconds Like 95362875 And Return To Me that number in the following way Years:3 Weeks:1 Days:1 Hours:17
21
by: asif929 | last post by:
I need immediate help in writing a function program. I have to write a program in functions and use array to store them. I am not familiar with functions and i tried to create it but i fails to...
0
by: dhaneshrs | last post by:
Heya guys, i need your urgent help.. Its in ASP .NET with Access DB. I am attaching the file i have done so far from various sources and help from people around me. My friends who have worked with...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.