Consider the following function: int f (int num) { int out = 0; for (; num > 0; num /= 10) { int d = num % 10; out *= 10; out += d; } return out; } 1) What does it do? 2) Write the same algorithm using recursion
Software Engineer Interview Questions
419,648 software engineer interview questions shared by candidates
How would you sort the list of version numbers. For eg: You are given a list A as ["1.1","1.1.5","12.0","1.23","12.3"]. Now sort this ?
Given an input string and a dictionary of words, find out if the input string can be segmented into a space-separated sequence of dictionary words. You need to output the minimum number of words. For example, input: "aaaisaname" dict: ("a", "aaa", "is", "name") output: "aaa is a name" Wrong output: "a a a is a name"
A box is divided into 4 boxes which is further subdivided into 4 boxes and so on. What is the best Data structure suitable for this scenario?
Division without divide operator
The logic part was not that easy for me
easy
Find all prime numbers no bigger than x.
1) A puzzle to find 3 numbers in an array which summed to 0.
Given a list of n elements...every element has a duplicate except one...Find that lone number?
Viewing 521 - 530 interview questions