Queue Reconstruction by Height
Problem Suppose you have a random list of people standing in a queue. Each person is described by a pair of integers (h, k), where h »
Problem Suppose you have a random list of people standing in a queue. Each person is described by a pair of integers (h, k), where h »
Welcome This page contains solutions to common interview problems that may be encountered. Arrays Longest Substring Without Repeating Characters Rotate a 2D Matrix Buy/Sell Two »
var jsav = new JSAV("ll"); jsav.label("Two sorted lists"); var ll1 = jsav.ds.list(); var ll2 = jsav.ds.list(); ll1.addLast("5").addLast("7").addLast( »
Problem Given a pre-order traversal array of integers and an in-order traversal array of integers, construct a binary tree. Input preorder - array of integers inorder »
Problem With a binary tree as input, determine if the tree is a BST or not Input node: Has 3 properties .val: Integer value of the »