My Background :

  • NIT Graduate
  • 4 yrs of experience at Top EDA company.

Online Assessment

  • MCQ Questions on C++, linked list, Heap and Trees. This was very basic and anyone can do this easily.

Coding Round :

1. Server Processing Time

Given:

  • numTasks tasks with processTime[i], numServer servers
  • Each server gets a contiguous block of tasks
  • Every server gets at least m tasks
  • Server processing time = sum of its m largest task times
  • Servers execute sequentially

Find: Maximum possible total processing time across all servers.

Example:

processTime = [1,3,5,2,7,1,5,9]
numServer = 3
m = 2

Answer:

31

Greedy approach work here

2. Minimum Operations to Make Array Palindrome

Given an array, in one operation you can:

Merge two adjacent elements → replace them with their sum

Find: Minimum number of operations required to make the array a palindrome.

Example:

[12,14,8,13,5]
→ [26,8,13,5]
→ [26,8,18]
→ [26,26]

Answer = 3

Simple two pointer works here.
Both Questions give feel about DP but it is not.
I solved both problems and got my interview invite.

Round 1 ( Virtual Interview):

  • Discussed about my multithreaded projects.
  • Thread vs Process, Concurreny vs Parallelism, Multicore processor and its use in modern day multithreaded environment.

Coding Question :

1. Given a number find the number that generates when we swap all even nibbles with next odd nibbles.

Example


Nibbles:
1 2 3 4 5 6 7 8
↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
│ │ │ │ │ │ │ │
└─┘ └─┘ └─┘ └─┘
 ↓   ↓   ↓   ↓

Output:
2 1 4 3 6 5 8 7

Result: 0x21436587
  • Solved Easily using bit manipulation and masking.

2. Find the pair of given sum in sorted doubly linked list.

1 <-> 2 <-> 3 <-> 4 <-> 6 <-> 8

Target = 10

Pairs:
2 + 8 = 10
4 + 6 = 10
  • Solved using binary search as this sorted doubly linked list.
  • Follow up question? How will you handle duplicates?
    Suggested a approach to skip duplicate pairs by travesing as the list is sorted.

Note: The Expectation was to write full code in an IDE (i used online ide), run the code and explain each line. You are allowed to debug and choose your preferred language.

I solved all the questions so far , got positive feedback from interviewer and outperformed everytime. But, No reply from HR and its been a week. Hoping for the best :)

Update: I got a generic rejection email after 2 weeks of ghosting ,they are moving with some other candidate :(

Comments (5)