1. mutable, non mutable classes in Java 2. declaring constants in Java 3. x^y algorithm and its optimization. 4. second largest number from Binary Tree
Software Interview Questions
550,966 software interview questions shared by candidates
Find the number of ways to get from one corner of a grid to the opposite corner, by going down or right only.
Check if a string is balanced
After Round 2 I Asked Interviewer How he would Solution for Above mentioned Q1 & Q2 questions of the Round 2 Technical Interview. Very Smartly Interviewer Did not take any effort to answer and also told me find it out by myself :)
Implement clearbit(int n, int p) function, p is the position of the bit to be cleared. Example : n is 13, p is 0. Binary representation of n : 1101. You need to clear the pth postion, means 0th position bit needs to be cleared.
Write a function to obtain a string with the binary representation of an integer
you have array with n elements. How would you do circular shift of k positions? Time and space complexity?
Write code to generate all possible case combinations of a given lower-cased string. (e.g. "0ab" -> ["0ab", "0aB", "0Ab", "0AB"])
Grid Illumination: Given an NxN grid with an array of lamp coordinates. Each lamp provides illumination to every square on their x axis, every square on their y axis, and every square that lies in their diagonal (think of a Queen in chess). Given an array of query coordinates, determine whether that point is illuminated or not. The catch is when checking a query all lamps adjacent to, or on, that query get turned off. The ranges for the variables/arrays were about: 10^3 < N < 10^9, 10^3 < lamps < 10^9, 10^3 < queries < 10^9.
Given a 1TB file of serialized 4 byte integers, and 2GB of ram, sort the integers into a resulting 1TB file. My interviewer was very collaborative in entertaining various solution ideas until we came up with a combo that would work performantly and reduce the number of passes over the 1TB file and intermediate files.
Viewing 521 - 530 interview questions