Design an algorithm to take a list of strings as well as a single input string, and return the indices of the list which are anagrams of the input string, disregarding special characters. Given a binary tree which is a sum tree, write an algorithm to determine whether the tree is a valid sum tree or not. Then, write an algorithm that will fix the tree to make it a sum tree. Then, write an algorithm which will fix a tree to make it a sum tree by only using addition.
Software Engineer Intern Interview Questions
9,348 software engineer intern interview questions shared by candidates
Binary search on a sorted array that was rotated once
I was asked two questions - how will you know which is the starting point in a circular linked list (write a program) and write a program to return two numbers from a function to the main
In-place array reversal, level-order binary tree traversal, reading two files and outputting strings common to both.
-Write a method that prints out an in order traversal of a binary tree
You are given a stock sequence like: 3, 6, 2,10, 5, 9. Each number represents the price for buying/selling a certain stock each day. You can buy once and sell only once. Find the maximum possible gain.
There was as such no hard question for me. But unfortunately i was not prepared for this interview. Frankly this was my first ever interview. So yes i was bit nervous and i didn't knew about the tips and tricks for cracking the interview at that time. I was asked the following 2 questions: 1. given a tree, do the level order traversal of the tree. Explain the logic and write it's proper code not pseudo-code. 2 given a link list, Reverse a Linked List in groups of given size. write it's code.
A inherits from B, which inherits from C. Will initializing A invoke constructor of C
1. Implement a hashset from scratch, write code for various methods of hashset. 2. Find all the pairs of numbers from a list that sums to a particular number.
Can't say but it had to do with a graph problem.
Viewing 1371 - 1380 interview questions