@WgpShashank: using linked list would be pain... because for all nodes
lying in the same vertical line , we need to access every time form the
head.

i guess using balanced BST would be better for eg if total number of
vertical lines are n.
then create balanced BST for i=0 to n-1....now every time node->data is
added to the vertical line no. *i* .
search for *i* in BST and update counter in that node.

inorder traversal of BST will give us output in ascending order.
wat say??

On Tue, Jan 24, 2012 at 4:41 PM, WgpShashank <shashank7andr...@gmail.com>wrote:

> @all , i think linked list will be the best data structure for this. isn't
> it ?
>
> Thanks
> Shashank Mani
> CSE,BIT Mesra
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/algogeeks/-/OY7Ivwd07voJ.
>
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to