Skip to content

Interview Experience 167

pkkp86nitd edited this page Aug 31, 2019 · 1 revision

2019

Software Development

"Round 1:(Online Coding Round )

There were 2 coding questions 28 mcq.

Ques 1:

Ques 2:

MCQs were related to coding only.

The platform for this round was ‘mettl’.

Don’t go for recursive codes on this platform.

Nearly 40 students were selected for next round.

Round 2:(Technical 1)

There were 2 coding questions in this round.

Ques1:

  • Two numbers ‘a’ and ‘b’ are given. Find the count of numbers which are divisible by both ‘a’ and ‘b’ and are less than 10^16.

Ques2:

  • People of Tribe A are living in a particular region. Then tribe B people shifted to the same region as of tribe A. People of tribe B doesn’t like to see tribe A people. A person from tribe B wants to travel from the train which covers ‘n’ stations. You have been provided with an array of size ‘n’ in which each element represent the number of tribe A people who board the train at that station. Find the maximum number of stations the person can cover without seeing more than ‘k’ number of people of tribe A. Also find the maximum people the person can see while covering those number of stations. (Person can start and end at any station).

    Hint: Basically the ques was to find the longest subarray whose sum of the elements doesn’t exceed k (With some variation) https://www.geeksforgeeks.org/longest-subarray-sum-elements-atmost-k/

Round 3:(Technical 2)

There were 2 coding questions in this round.

Ques1:

  • We are provided with a number ‘n’ which denotes the number of opening and closing parenthesis. Print all the valid combination of parenthesis.

    https://www.geeksforgeeks.org/print-all-combinations-of-balanced-parentheses/

  • Then this ques was modified to find the total number of valid combinations possible for a given ‘n’.

    Optimized Solution: Time complexity: O(n^2) and Space Complexity: O(n^2)

    Then he asked me to optimize space

    Again optimized: Time complexity: O(n^2) and Space Complexity: O(2n)=O(n)

Ques2:

  • We have a telescope and we can see an infinite number of stars(one by one). We have been provided with a method() that will calculate the distance of each star from us. So at any point print the closest ‘k’ stars which we can see.

    Solution: use heap(priority_queue)

Round 4:(Technical 3)

There were 2 coding questions and technical questions

Ques1:

Technical questions related to OS, OOPS, Computer Networks

Ques2:

  • There are infinite number of people visiting the Amazon website. A person can visit the website several time. A stream of number are coming that represent id of the person visiting the website and a fixed number ‘k’ is provided. At any particular time find ‘k’ people who have most visited our website.

    Solution: use map and heap(priority_queue)

Round 5:(Bar-Raiser)

Tell me something about yourself. Then questions on each term I was using.

Coding ques1:

  • Given an expression find whether it is valid or not.

This was implementation based ques and whether I am covering all the corner testcases or not.

This was the last round.

7 people were selected from my college.

Duration of each round was 60 to 90 minutes.

Be prepared to write code for each and every approach you are telling.

"

Clone this wiki locally