How to implement a queue using one integer. this should store value 0 to 9. example suppose queue has first value 2 then insert 4 then 6 so it should look like 246. first value should be popped as 2. then it should be 46. program should support 0 in all the levels also. example queue should handle like 01235 also, 0 as first value in queue. remember 0 just to use integer, nothing else as data storage. Click for Solution |
-
Warning: Illegal string offset 'name' in /home/prepdo6/gpl4you/discussquessub.php on line 681
A in the given solution the pop would need a right bit shift operation as
01000101 &11110000 will not give 4 but 0100 0000
that need to be shifted to get 4
Warning: Illegal string offset 'name' in /home/prepdo6/gpl4you/discussquessub.php on line 664
Explore
- GPL4you
- Home
- Prepdoor - Online Mock Test
- About
- FAQs
- Contact
- Contact Us
© 2011 - gpl4you | All Rights Reserved.