You are on page 1of 3

strings

HTTP AND HTTPS


what happens when you search somehing on google, DNS explain, port number of DNS, if you
search something and search the same thing again what will happen, then they asked some
questions on SSL and TLS.

port number of different protocols,

Can we change the port numbers

Explain paging, Deadlock, ROM, RAM, Bankers algorithm, What is cloud computing, different
between cloud computing and data centers, some linux commands like how to delete a process
how you are able to find the process id.

Match the substring in the bigger string and find the index of the first occurrence of the string
catch was that if The bigger string is ABCFABCXBCDABCX and the substring is ABCD in place
of X the fourth matching character is on that place. I wrote the code in 11-12 minutes then they
asked me to optimize the code I said we can do that by using knuth morris algo.

pointers, garbage collector


OSI model, flow control
MAC address on which layer it is added, Can we change MAC address
TCP and UDP and at which layer these protocols works
Then they asked me right now we are taking your interview which protocols is working tcp or
udp
At last two coding questions right regular expression for email validation in python and write
word count program on code pair.

Ancestral Sorting
Spin Wheel Question
Problem on Merge sort (Inverse Swap count):
https://www.geeksforgeeks.org/number-substrings-count-character-k/

Comparator Sort, Deep Algorithms


using lambda expressions are implemented in Java.
Computer Networks, Java fundamentals (ex: OOPS, Static and final variables, Memory
layout of JAVA, Collections)
Example: When will you use ArrayList and LinkedLiist in JAVA.
There was one coding question of dynamic programming, two questions were from array
and string, respectively, and one question was for Python only.
1. An array of schedules of tech presentations are given. It has a start time and ends
time. Find the maximum number of presentations that can be attended by a
person.
2. Alphabets are arranged on a wheel. Given, an encrypted string decrypts the string
by replacing each character with kth character anti-clockwise.
3. Given a function f, and its argument. Return a function that does the same
operation as f would but with the arguments reversed. (Python only)

Given n piles of boxes of unequal height. Find the minimum number of steps required to
make all piles of the same height. In one step, and no. of boxes can be removed from a
pile of bigger height to the next lower height pile.

1. Define TCP model and/or OSI model


2. The flow of data when a link is clicked.
3. Iterables, decorators, generators of Python.
4. Common networking commands will also be discussed.

5. You are given a binary array (with only 1s and 0s), and you are supposed to bring
all the 1s to the right and all the 0s to the left, or vice-versa. The operation that can
be performed is to swap two adjacent values, find the minimum number of
operations needed.
6. You start from the 0th position and at every step, you can choose to move I (i is
the step number) steps forward or can remain in your position. There is a bad
index in which you cannot stand. Find the maximum index you can reach in k
steps after avoiding the bad Index.
7. Given a list of names appended with roman numbers. First sort them with names,
then with the numbers appended to them, in increasing order.
8. A string question related to appending a string multiple times to get a given string.
If we can make the first string by appending the second string multiple times, then
we have to return the smallest string that will produce the second string by
appending one or more times.

What is the complexity of quicksort and how to make it always nlog(n).

What is virtualization (In terms of virtual memory). In a single-core system, 3 processes


are running of size 526Mb each and the system memory is 1Gb. How is the os handling
this? Question related to page replacement.

The process followed in DHCP protocol

Difference between TCP and UDP. What happens when you type www.google.com in your
browser. What happens when you connect an Ethernet cable to your system. What is
dynamic IP.
1. Given an array of size n and an integer k, find the maximum values of all the
subarrays of size k.
2. Evaluate an expression tree.
3. Asked the third question, to tell the logic of forming the expression tree, but then
the time was over.

1. Then asked a coding question: Given a comma-separated list of keys and some
other comma-separated values in a vector of strings(like a CSV file), parse that
and return a vector of the map with key-value pairs in it.
2. Asked about child, parent, zombie process.
3. Difference between thread and a process, I was confused and giving wrong
answers, but he went on for around 10 mins.
4. Then loaded a question from the first round (question with the badIndex), and told
me to optimize my code, I was able to give the optimization in the case when we
are calling the function multiple times(by storing all the results beforehand).

Create a function pointer

1. Tell something about virtualization in C++, I couldn’t answer.

Wrote the code: char *ch = new char[10]; Asked about memory allocation in heap and
stack. Create 10 character pointers.

Count the number of consecutive letters and append the number to the character. Not
allowed to use the map or any extra space. Manipulations had to be done on the input
itself. The only extra space given was some space at the end of the input string (which is
equal to the length of the string). Struggled for an hour in that but didn’t reach the final
answer.
Input : “aaaabbbca”
Output : “a4b3c1a1”

Section C: This section has 3 coding questions. The first one was on array, the second
one was on a string and the third on was on trees. The first two questions were easy but
the third one was very difficult.

You might also like