SAP Labs | SSE | Bangalore
Anonymous User
2929

Round 1:

  • Write an efficient function that takes stockPrices and returns the best profit I could have made from one purchase and one sale of one share of SAP stock yesterday.
    You need to buy before you can sell. You can't buy and sell in the same time step.
    int[] stockPrices = new int[] {10, 12, 5, 8, 11, 9, 3, 7}; // The indices are the time, so 9h it was 10 EUR, 10h it was 7 EUR and so on
    getMaxProfit(stockPrices);
    // returns 6 (buying for 11)
  • Question from resume, projects and technologies used in the past

Round 2:

  • A coding problem on hashMaps. It was easy.
  • Question on java basics
  • Question on design patterns

Round 3:

  • HLD: system desgin like netflix.
  • questions on databases, garbage collection, rest apis
  • singleton, factory etc design patterns

Round 4:

  • It was a manager round. Question on past projects, Design patterns.
  • Questions on education, salary expection etc
Comments (4)