Just a query :
If the queue is implemented as an array, then is it not possible to swap
the elements from the last and first position onwards until you reach
middle point. Wont this use O(1) space and O(n/2) time.
On Wed, Jun 20, 2012 at 1:56 PM, Hassan Monfared hmonfa...@gmail.comwrote:
Yes this is the solution when the binary tree is complete binary tree
Thanks and many regards,
Sreeprasad Govindankutty
On Sat, Apr 16, 2011 at 3:57 PM, Pratik Kathalkar dancewithpra...@gmail.com
wrote:
I think this solution is applicable if the binary tree is complete binary
tree, isn't
If duplicate values are allowed ::
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class PartionNumber {
public static void main(String[] args) {
System.out.println(Enter the number);
InputStreamReader ifn = new InputStreamReader(System.in);
from this group, send email to
algogeeks+unsubscr...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Thanks and many regards,
Sreeprasad Govindankutty
--
You received this message because
...@googlegroups.comalgogeeks%2bunsubscr...@googlegroups.com
.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Thanks and many regards,
Sreeprasad Govindankutty
--
You received this message because you are subscribed to the Google Groups
Algorithm