Given a string, check for balanced parenthesis
Software Engineer Interview Questions
420,052 software engineer interview questions shared by candidates
Mostly C program based questions will be helpful for this interview process
Given a dictionary of words and another word, return all the words in the dictionary that are anagrams of the given word
If you have a sorted array that is initialized with size 100, the values stored would be for example 1, 2, 3,.... ect. Describe an algorithm that would check if there is a duplicate number and if so return it.
Came up with a program to take a string and printed the characters that appear more than once in the exact order as they are in the original string.
Given an array with duplicate elements give an algorithm to get the count of distinct elements in the array
Given a tree where every right node is a leaf, meaning that it can only extend on the left side, invert it such that the leftmost node is now the root, and all of the previous left nodes are now on the right side. The former right nodes will be on the left side.
A couple tricky questions. One required writing a modified binary search, the other dealt with data structures and how to efficiently check if a given set of numbers contained two numbers summing to some other number x.
2. /** * A tournament tree is a binary tree * where the parent is the minimum of the two children. * Given a tournament tree find the second minimum value in the tree. * A node in the tree will always have 2 or 0 children. * Also all leaves will have distinct and unique values. * 2 * / \ * 2 3 * / \ | \ * 4 2 5 3 * * In this given tree the answer is 3. */ class Node { Integer value; Node left, right; Node(Integer value, Node left, Node right) { this.value = value; this.left = left; this.right = right; } } class Solution { /** * This should return the second minimum * int value in the given tournament tree */ public static Integer secondMin(Node root) { } }
Viewing 1211 - 1220 interview questions