Show Buttons
Share On Facebook
Share On Twitter
Share On Google Plus
Share On Linkdin
Share On Pinterest
Share On Reddit
Share On Stumbleupon
Contact us
Hide Buttons

Category: Trees

g4283 0

Generate Maximum revenue by selling K tickets from N windows

Objec­tive: Given ‘N’ win­dows where each win­dow con­tains cer­tain num­ber of tick­ets at each win­dow. Price of a ticket is equal to num­ber of tick­ets remain­ing at that win­dow. Write an algo­rithm to sell…

g4307 0

Construct Binary Search Tree from a given Preorder Traversal Using Stack (Without Recursion)

Objec­tive: — Given a pre­order tra­ver­sal, con­struct BST from that, with­out using recur­sion. Input: Pre­order tra­ver­sal Sim­i­lar Prob­lem : This prob­lem is sim­i­lar to the Con­struct Binary Search Tree from a given Pre­order Traversal…