Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.
Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.
It was conducted in Hacker rank which consisted of 10 aptitude questions that included C, C++, Java MCQ. 2 programming questions were also given.



Down: (row+1,col)
Right: (row, col+1)
Down right diagonal: (row+1, col+1)
Dijkstra's algorithm can be used to solve this problem as we need to find the shortest path between source and destination. Each cell of grid represents a vertex and neighbor cells adjacent vertices.
Dijkstra's algorithm :It basically starts at the source node and it analyzes the graph to find the shortest path between that node and all the other nodes in the graph.
The algorithm keeps track of the currently known shortest distance from each node to the source node and it updates these values if it finds a shorter path.
Once the shortest path between the source node and another node is found, that node is marked as "visited" and added to the path.
The process continues until all the nodes in the graph have been added to the path. This way, we have a path that connects the source node to all other nodes following the shortest path possible to reach each node.
Pseudocode :
function Dijkstra(Graph, source):
2: for each vertex v in Graph: // Initialization
3: dist[v] := infinity // initial distance from source to vertex v is set to infinite
4: previous[v] := undefined // Previous node in optimal path from source
5: dist[source] := 0 // Distance from source to source
6: Q := the set of all nodes in Graph // all nodes in the graph are unoptimized - thus are in Q
7: while Q is not empty: // main loop
8: u := node in Q with smallest dist[ ]
9: remove u from Q
10: for each neighbor v of u: // where v has not yet been removed from Q.
11: alt := dist[u] + dist_between(u, v)
12: if alt < dist[v] // Relax (u,v)
13: dist[v] := alt
14: previous[v] := u
15: return previous[ ]



Conditions for valid parentheses:
1. All open brackets must be closed by the closing brackets.
2. Open brackets must be closed in the correct order.
()()()() is a valid parentheses.
)()()( is not a valid parentheses.
A stack can be used to solve this question.
We traverse the given string s and if we:
1. see open bracket we put it to stack
2. see closed bracket, then it must be equal to bracket in the top of our stack, so we check it and if it is true, we remove this pair of brackets.
3. In the end, if and only if we have empty stack, we have valid string.
Complexity: time complexity is O(n): we put and pop each element of string from our stack only once. Space complexity is O(n).
Technical round with questions based on data structures, oops and networking.



Use the inbuilt functions to read a file.
For each line, store the number of characters and the number of words in each line.
At last, return the number of the words of the line with the largest number of characters.



To solve the question using a max heap, make a max heap of all the elements of the list. Run a loop for k-1 times and remove the top element of the heap. After running the loop, the element at top will be the kth largest element, return that. Time Complexity : O(n + klogn)
The question can also be solved using a min heap.
Approach:
1. Create a min heap class with a capacity of k
2. When the heap reaches capacity eject the minimum number.
3. Loop over the array and add each number to the heap.
4. At the end, the largest k number of elements will be left in the heap, the smallest of them being at the top of the heap, which is the kth largest number
The time complexity for this solution is O(N logK).
He asked me how I will check whether I have internet connection in my system?
A ping network test transmits data packets to a specific IP address and either confirms or denies there is connectivity between IP-networked devices. So, ping www.google.com will respond.
What happens when you type a URL in the web browser?
A URL could contain a request for HTML, an image file, or something else entirely.
1. If the content of the inputted URL is fresh and in the cache, then show it.
2.Otherwise, locate the domain's IP address so that a TCP connection can be established. A DNS lookup is performed by the browser.
3. A browser must know the IP address of a URL in order to establish a TCP connection. This is why a browser need DNS. The browser checks for URL-IP mapping cache in the browser first, then in the OS cache. It conducts a recursive query to the local DNS server if all caches are empty. The IP address is provided by the local DNS server.
4. A three-way handshake is used by the browser to establish a TCP connection.
5.A HTTP request is sent by the browser.
6.A web server, such as Apache or IIS, is operating on the server, which receives incoming HTTP requests and responds with an HTTP response.
7.Browser receives the HTTP response and renders the content.
Technical round with questions based on data structures, oops and networking.



You are given ‘ARR’ = {-2, 1, 2, -1, 0}. The sorted array will be {-2, -1, 0, 1, 2}.
Radix sort is a sorting method that groups the individual digits of the same place value before sorting the components. After that, arrange the components in ascending/descending order. Radix sort is a sorting method that groups the individual digits of the same place value before sorting the components. After that, arrange the components in ascending/descending order.
Algorithm :
radixSort(array)
d <- maximum number of digits in the largest element
create d buckets of size 0-9
for i <- 0 to d
sort the elements according to ith place digits using countingSort
countingSort(array, d)
max <- find largest element among dth place elements
initialize count array with all zeros
for j <- 0 to size
find the total count of each unique digit in dth place of elements and
store the count at jth index in count array
for i <- 1 to max
find the cumulative sum and store it in count array itself
for j <- size down to 1
restore the elements to array
decrease count of each element restored by 1
When you search for a particular product in amazon, it displays some of the search results. But, only few particular products which are available in amazon are displayed, not all. How does this happen?
I told Machine Learning.
Follow up questions :
1.What data structure do they use? Hash tables.
2.What will be the key and what will be the values? The product will be the key. The brands will be the values.
Applications of Fibonacci series in real life
Few real life examples are :
Flower petals. The number of petals in a flower consistently follows the Fibonacci sequence. .
Seed heads. The head of a flower is also subject to Fibonaccian processes. .
Spiral galaxies.
Tree branches.
Shells.
HR round where the interviewer asked questions to know more about me.
1. Discussion about my projects.
2. If you don’t get selected for PayPal, what will you do?
Tip 1 : The cross questioning can go intense some time, think before you speak.
Tip 2 : Be open minded and answer whatever you are thinking, in these rounds I feel it is important to have opinion.
Tip 3 : Context of questions can be switched, pay attention to the details. It is okay to ask questions in these round, like what are the projects currently the company is investing, which team you are mentoring. How all is the work environment etc.
Tip 4 : Since everybody in the interview panel is from tech background, here too you can expect some technical questions. No coding in most of the cases but some discussions over the design can surely happen.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is recursion?