Goldman Sachs 上门挂经

Coderpad OA:
best Average marks of a student
[[“Cedric”, “87”],
[“David”, “100”],
[“Terry”, “56”],
[“Cedric”, “95”]]
answer = 100
Pascal’s triangle problem

Codepad OA
given question and existing solution(which is not working) need to debug and correct the solution to pass all assertions

店面
About Current project and role
Why GS?
2 brain teasers

上门:

  1. Introduction
    webservices/architecture about project
    REST and SOAP, diff types, Json serializer and de-serializer
    a) Problem: given an array it should contain 0 to N-1 values such as arr[i] = i, if value is not present in given array then arr[i] = -1;
    eg: {-1,-1,5,6,4,-1,2} —> {-1, -1, 2, -1, 4, 5, 6}
    Time complexity ^^ problem optimise given solution
    Diff data structures and their time complexities
    how hashMap works
    b) Problem: given arr[1,4,6,3,8,2] —> sorted in stack should not use any other DS other than stack
    DESIGN: there is a file which contains 2million records how you process and filter invalid data
    — Any Questions —

  2. Introduction
    a) Problem: input contains List, String —> possibleAnagram
    {“to”, “toe”, “toes”}, “eot” —> return true
    question was updated for this case: {“to”, “toe”, “toes”}, “eot*” —> true as * is replaced by anyCharacter
    b) List of possible currency conversions from one to another, find whether there is a cycle.
    USD —> EUR
    USD —> JPY
    USD —> GBY
    EUR —> CNY
    EUR —> JPY
    JPY —> KRY
    JPY —> GBY
    GBY —> KRY
    KRY —> BTC
    BTC —> ETH
    ETH —> USD

    return: USD —> JPY —> KRY —> BTC —> ETH —> USD (or)
    USD —> GBY —> KRY —> BTC —> ETH —> USD