Linkedin Online Assessment for Software Engineer
Anonymous User
4574

YOE: 3.5
Location: Bangalore, India
Applied on Linkedin jobs section.
4 Questions, 90 minutes to solve all.

Q1: Min cost to paint houses, given array cost[x][y]= cost of painting house X with paint Y. (medium)

Q2: Given number n, calculate number of operations to reduce n to 0 where any operation can be of 2 types: (medium/hard)

  1.  Set or unset of rightmost bit
  2.  change ith bit if i+1th is set to 1, and i+2 to rightmost are 0.

Q3: Array of nums, return min index where the value val = (arr[i]^arr[i+1])%10^9+7 is maximized.(easy)

Q4: Given 3 strings, String A, B and C and a number k where

  1.  B is the alphabet in which A is written. 
  2.  C is a string of bits(1s and 0s), where 1 denotes special char and 0 denotes normal.
    Return longest substring of A having at most 'k' normal chars.

Was able to solve 1,3 and partially solve 2, but wasted a lot of time on Q2. Did not get time to solve Q4.

Comments (6)