Given a list of integers A and an integer k, return the number of unique pairs of integers in A that sum to k. For example, if A=[1 2 5 5 10 8 2] and k=10, the answer is 2, arrived as 5+5 or 2+8. There were 15 tests for this question, with at least the last two timing out, given that the implementation was not as efficient as possible.
Softwareentwickler Php Interview Questions
512,342 softwareentwickler php interview questions shared by candidates
/* * Suppose we have a sorted array in ascending order, with no duplicates: * * {1, 2, 3, 4, 5, 6, 7} * * Somehow an unknown amount of numbers at the beginning are shifted to the end, * creating an array that looks like: * 0 1 2 3 4 5 6 * {3, 4, 5, 6, 7, 1, 2} * * Let us call the new array a shifted cyclic array. * * Now, given a Shifted Cyclic Array int a[], and its length n (> 0), write a function * to find the smallest number in the array. */
compress strings such as "aaabbbcccc" into the string "a3b3c4"
use bit operations to write a function that will determine if a number is a power of 2
Write a method to generate the Fibonacci series
Print out a binary tree level by level
Given array of elements of 3 types. Sort it.
Given an unsorted array, extract the max and min value using the least number of comparison.
Given a list of strings, for each string, find if it has an anagram in the list.
Given a set of non-overlapping integer ranges (1,3) (5,8), etc., and an input integer, what is the best way to organize the data and allow for quick search based on the input, etc.
Viewing 851 - 860 interview questions