Write a piece of code to calculate a square root of a number.
Software Engineer Interview Questions
467,307 software engineer interview questions shared by candidates
Implement method oneEditApart that return boolean: true, if using one operations (insert or remove or replace) we can modify one string to get another. False otherwise. // Signature: boolean oneEditApart(String s1, String s2) // Allowing operations insert remove replace Example: oea("cat", "cut") => true // replace "u" -> "a" oea("cat", "cuts") => false // no operations oea("ca", "ca") => false // no operations oea("cats", "cat") => true // remove "s" oea("cat", "at") => true // insert "c" oea("cat", "cbat") => true // remove "b"
There was a tree and I was supposed to make a double linked list from the tree using a pre order traversal.
you have a list of people, and a function that return true/false if one person knows the second person. write a function that finds a VIP, which everybody knows and he doesn't know anybody else.
Given a set of integers, print out all its subsets. Write C/C++ code to solve it.
given an array of strings, find all the lists of anagrams present.
Is having more cores in processor always solve the problem of throughput
A and B are 32 bit numbers with first 16 bits valid in A and next 16 bits valid in B. (The non-valid bits aren't necessarily 0). WAP that adds A and B without using arithmetic operator.
Track the median and mean of a growing set of integers with constant space complexity.
Write a C program to encode bits in a 32-bit number such that, most significant 16 bits should be reversed but lower 16 bits should be untouched. Then asked to generalize this to any number of bits.
Viewing 2161 - 2170 interview questions