Interview questions
Software Developer interview questions – page 4
945 questions. Tap “Show answer” to check yourself.
-
session and cookies?
-
Javascript clausers?
-
Jquery function to get domain from a url?
-
Given a no K and an array. Find pair of elements whose sum is equal to given no K
-
If there is a website run by 2 servers. These 2 servers balances the load using Load Balancer. So, if 1 session is created on 1 server and say load is shift to another server immediately, then how session is maintained?
-
WAP to implement some basic Design Patterns like Singleton?
-
Abstract class? How it is different from interface? Is multiple inheritance possible in php? How?
-
Write a stored procedure from a given set of tables and conditions. Simple one
-
Given a binary tree, print sum of each level ?
-
Add two integers which cannot be stored even in long long int?
-
Length of longest substring with no repeating character (Full running code)?
-
There is a function getWord() which takes word as input and checks whether word is present in the dictionary. Given a long word as input find all the meaning full ( i.e getWord() is true ) that can be made from the given input . Example : Input : antin output : a , an , ant, tin, in
-
There are 2 sets of countries. One set will donate clothes (something of this sort) and anotherset will accept clothes. A country can be in only 1 of the sets. The amount of clothes donated is also given. The problem is to maximize this amount of clothes. Condition: OnetoOne relationship must be there between countries in different sets. Test Cases are like this: {4,4,5,{1,3,7},{1,2,6},{2,1,5},{3,4,6},{4,2,4}} {r1,r2,tc,{c1,c2,a},….} r1 = no. of countries in set1 r2 = no. of countries in set2 tc = no. of testcases followed by that no.of testcases {c1,c2,a} = c1 country is giving 'a' amount of clothes to c2 country. Maximize the total amount donated, following the condition that one country can donate to only one country and one country can accept from only one country
-
input: "kitten%20pic.jpg" output: "kitten pic.jpg" %20 -> ' ' %3A -> '?' %3D -> ':' modify your input in place. no string library functions. void DecodeURL(string str
-
Given an array, return true, if it can be partitioned into two subarrays whose sum of elements are same, else return false Example: Input: {5,1,5,11} Output: true (as it can be divided into {5,1,5} {11} where 5+1+5=11)
-
Find out the maximum contiguous circular sum in array, array may contain positive as well as negative numbers?
-
He asked me what is a data structure and why do we use one. Explained him. He asked some real life example of stack and queue. All I could gave him was programming examples but when he insisted on real life examples I gave him some weird made up not so real life example. :-p
-
n a line where words are separated by spaces, , and capitalize first letter of the reversed word. Other letters of the word should be in small. Input : "how are you?" ? Output: "Woh Era ?uoy"
-
Write down function to select pivot element randomly in Quick Sort
-
How do you implement LRU cache?
-
Given a array of digits. print all combination of of these i.e all no formed by these. repetition allowed. and then repetition not allowed example: i/p: arr={1,2,3} o/p: (without repetition) 123, 132, 213, 231, 312, 321
-
Print all nodes at a distance k from a given node in binary tree?
-
randN function : which generates random number in [1,2,3..N] with equal probability. Given rand5, write a code for rand7 using rand5
-
Puzzle: Using all(8,8,3,3) and only operators(*,/,-,+), make 24
-
You are given an array of elements. Some/all of them are duplicates. Find them in 0(n) time and 0(1) space. Property of inputs – Number are in the range of 1..n where n is the limit of the array
-
Pointers with increment/decrement, address of and value at operators (++,–,*,&)
-
A point and a rectangle is present with the given coordinates. How will you determine whether the point is inside or outside the rectangle?
-
There is a point inside the rectangle. How will you determine the line that passes through the point and divides the rectangle into 2 equal halves?
-
There is a scheme which contains 8-bit and 16-bit signed numbers. How many such combinations are possible?
-
Locate the sum of 2 numbers in a linear array (Unsorted and sorted) and their complexities