Wednesday, November 7, 2012

Bank bazaar interview questions

Bank Bazaar Test: [Question from interviewstreet.com ]

4 Programming Questions

Time: 2 hours

Languages: C/C++/Java
  1. Longest sequence Problem and sorting it.
  2. Northern and Western Skyline of buildings. Given x,y cordinates of diagonal of rectangle and the height of building.
  3. A and B are arrays. B is generated from A. A is 1…N shuffled in some order.
    B[i]= number of items which are greater than A[i] for all indices>i
    example. N=4, B=[1 1 1 o]
    output A = [3 2 1 4]
  4.  Finding a match for a man based on Help factor and proposal acceptance factor. Social networking kind of scenario and need to find a match with a max of  3 hops. Cannot propose immediate friends but can propose friends of friends. Friends can be male/female. but proposal can be only to females.
————————————————

SNAPSTICK

Time: 1 hour

Number of Questions : 9

Need to write Pseudocode for all 9 questions
  1. 1. One line function to convert months(0-11) to quarter (0-3) . eg. mar-jun isin quarter 0. You cannot use if, switch, ternary, loop, etc.
  2. Reverse a sentence word wise, eg. “This is cow” ==> “cow is this”
  3. Image floodfill algorithm. given routines getcolor and setcolor
  4. Given a number count number of bits that are ’1′
  5. maxDepth of a tree given roots. Remember tree  and not binary tree.
  6. in-place swapping in an array data using another array holding positions of the elements
  7. getTop10() elements of a stream data at any instant . Also getkthlargest() data(here 10th largest i.e; k=10)
  8. Dont remember
  9. Dont remember
    ————————–
    PAYPAL
    5 Series questions like this and more coplex ones
    Q. 1,2,3,2,5,6,7,8,3,10,11,12,13,14,15,?some questions on cutting the rectangle in equal pieces1 logic question on telling lies and truth2 programming questions
    Q. Program to check if a n-digit number is Armstrong
    Q. simple switch-case program
————–
Strandlife
————

75 minutes

7 Questions:

1. REKHA * 4 = AHKER find number REKHA
2. 10 Green and 10 Blue balls . 5 balls drawn randomly(blindfolded). What is the probability that there are atleas 4 green balls.
3. Find numbers from 1 to 100 having odd number of factors
4. Euclideans algorithm for GCD
5. Two integer arrays A and B. Find for each x in A find the elements y in B such that |x-y| > k where k is an integer.
6. Pseudocode to find all the factors of a number n efficiently in space reduced.
7. Given a collection of strings <S1,….,Sn> and a query string q Determine if
a> q is equal to any string in collection
b> q is prefix of some string
c> q is substring of string

1 comment:

  1. Hi,
    Could you post solution for bank bazaar interview question number 3 ?
    A and B are arrays. B is generated from A. A is 1…N shuffled in some order.
    B[i]= number of items which are greater than A[i] for all indices>i
    example. N=4, B=[1 1 1 o]
    output A = [3 2 1 4]

    ReplyDelete