11 Answers Given references to roots of two binary trees, how do you short circuit determine whether the sequences of the leaf elements of both the trees are same ? The structure of two BTs may be different. Short circuit : for ex. If the very first leaf element of each tree is different, the algorithm should stop immediately returning false instead of checking all the leaf elements of both trees.
Software Development Engineer Interview Questions
32,842 software development engineer interview questions shared by candidates
Given 'n' integers, print the numbers given in a range
Determine if two strings are anagrams.
Given an inorder representation , how many BST's can be formed from it.
Find the maximum number of substrings with k distinct characters. input: "pqpqs", k=2 output: [pq,pqp,pqpq,qp,qpq,pq,qs]
How will find if an integer is power of 2.
Write OOP system to parse different type of error formats.
How can design a TinyURL for a website? Design an algorithm and write sample code which generates TinyURL for a website.
Second interview: Simple twosum problem.
OA : Minimum Cost to Connect Sticks A BFS question Interview: Valid Parentheses Generate Parentheses Remove Invalid Parentheses
Viewing 931 - 940 interview questions