Follow via:
RSS
Email Alert
Question
0 Votes
+ -

Array queue class

In this exercise the queue elements are to be rearranged so that all the zero elements are
placed at the end, without changing the order of non-zero elements.
Write a C# class with following three methods viz.
Public static void Main ( ) method,
Public static void Arrange (ref LinkedQueue q) method and
Public static void PrintQueue (LinkedQueue q) method.
The Main ( ) method should asks the user to input numbers with some zero and some non-zero numbers, terminated by -1 and store these numbers in a queue say Q. Note that -1 is not
to be stored in the queue.
Arrange ( ) method will rearrange the elements of the parameter queue, as mentioned above.
PrintQueue( ) method will print all elements of the parameter queue.
Important Note: You must use the LinkedQueue class
Updated - 23rd Feb
Answer the question
Formatting +
BB Codes - Note: HTML is not supported in forums
  • [b] Bold [/b]
  • [i] Italic [/i]
  • [u] Underline [/u]
  • [s] Strikethrough [/s]
  • [q] "Quote" [/q]
  • [ol][*] 1. Ordered List [/ol]
  • [ul][*] · Unordered List [/ul]
  • [pre] Preformat [/pre]
  • [quote] "Blockquote" [/quote]

Join the TechRepublic Community and join the conversation! Signing-up is free and quick, Do it now, we want to hear your opinion.