AK47
BAN USER
Questions (4)
Comments (1)
Reputation 40
- 1of 1 vote
Answershow to divide an integer array into 2 sub-arrays and make their averages equal? e.g. a[left_portion]/left_portion_num == a[right_portion]/right_portion_num.
- AK47| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Math & Computation Data Structures Coding Algorithm - 0of 0 votes
AnswersAn array A[1...n] contains all the integers from 0 to n except one. In this problem, we cannot access an entire integer in A with a single operation. The elements of A are represented in binary, and the only operation we can use to access them is "fetch the jth bit of A[i]", which takes constant time. Find the missing integer in O(n) time.
- AK47| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Math & Computation Data Structures Coding Algorithm - 0of 0 votes
AnswersGiven 2D Matrix of characters; find whether a word is there in this array. It can start at any position and can be present horizontally, vertically and diogonally both in forward and reverse order.
- AK47| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Coding Algorithm
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
same number of 1 bits(001, 010, 100). say, given 5(101), 3(011) is the previous one and 6(110) is the next one.
- AK47 November 09, 2007