--- In [email protected], "umesh_2g" <[EMAIL PROTECTED]> wrote:
>
>
> I am the student of BCA Course.
>
> Please help in my C-Language Assignment.
>
> The question given below.
>
>
>
> Question 1: What are priority Queues? How can priority queues be
> implemented? Explain.
>
>
>
> Question 2: Write a program in `C' programming language to add
> two polynomials
>
> using linked list.
>
>
>
> Question 3: Write a non-recursive function in `C' programming
> language to reverse a doubly linked list.
>
>
>
> Question 4: Let G=(V,E) be an undirected graph. Use depth-first
> search to develop a
>
> program using `C' language to convert each edge in G to a
> directed edge such that the resulting graph is strongly connected,
or
> determine that this is not possible
>
>
>
> Question 5: Consider a linked list with n integers. Each node
of the
> list is numbered
>
> from `1' to `n'. Develop a program using `C'
> language to split this list into 4 lists so that:
>
>
>
> § first list contains nodes numbered 1,5, 9, 13- - -
>
> § second list contains nodes numbered 2, 6, 10, 14- - -
>
> § third list contains nodes numbered 3, 7, 11, 15- - -
>
> § and fourth list contains nodes numbered 4,8, 12, 16- - -
>
>
>
> Question 6: Write a program in `C' programming language to
> list the nodes of a binary tree in the following way: List the root,
> then nodes at depth 1, followed by nodes at depth 2, and so on.
>
>
>
> [Non-text portions of this message have been removed]
>
hi.....
i know only one answer just ive studied..
1.What r priority queues n how they are implemented:
priority queues are the queues which does not follw
any criteria like the queues. The queues in wh we can insert or
delete the items based on the some property of the queue ,that are
priority queue.
They are called priority becoz they enable us to
retrivee any element of the queue neither by insertion time,nor by a
match,but by which item has the highest priority.
In a computer sys ,diff jobs are assigned and completed .
The jobs r given as per priority. whenever cpu is free it takes the
from the queue and completes the job as per requirement of priority.
Priority queues are of 2 types:
1.ascending priority queues
2.descending priority queues
They are implementeed by two ways:
1.maintaining ordered link list of the elements
2.maintaining unordered link list of the elements
In this both queue we can delete the element which is smallest .
(as per pur syllabus)
1. In ordered link list the insertion if difficult as while
insertion only we have to sort the elements.
But in this deletion is easy as we can delete smallest element
which is at first position (in ascending ).
2. In unordered link list ,insertion is easy as we have to not
maintain any order. But while performing deletion operation we can
delete the element which is smallest(in ascending)For that purpose we
have to traverse through the list.
hi.....
i know only one answer just ive studied..
1.What r priority queues n how they are implemented:
priority queues are the queues which does not follw
any criteria like the queues. The queues in wh we can insert or
delete the items based on the some property of the queue ,that are
priority queue.
They are called priority becoz they enable us to
retrivee any element of the queue neither by insertion time,nor by a
match,but by which item has the highest priority.
In a computer sys ,diff jobs are assigned and completed .
The jobs r given as per priority. whenever cpu is free it takes the
from the queue and completes the job as per requirement of priority.
Priority queues are of 2 types:
1.ascending priority queues
2.descending priority queues
They are implementeed by two ways:
1.maintaining ordered link list of the elements
2.maintaining unordered link list of the elements
In this both queue we can delete the element which is smallest .
(as per pur syllabus)
1. In ordered link list the insertion if difficult as while
insertion only we have to sort the elements.
But in this deletion is easy as we can delete smallest element
which is at first position (in ascending ).
2. In unordered link list ,insertion is easy as we have to not
maintain any order. But while performing deletion operation we can
delete the element which is smallest(in ascending)For that purpose we
have to traverse through the list.