Tip 1 : Practice a lot of DSA questions.
Tip 2 : Learn system design also.
Tip 1: Should be of 1 page.
Tip 2: Mention projects along with important details in bullet forms.
It was on Amcat platform from 8 pm to 11 pm. We were allowed to login anytime between 8 pm and 8:3 to start the test. It was a proctored test. It consisted of 4 sections to be finished in 2.5 hours. 1st section was code debugging round were 6 questions were there to fix the bugs in the code within 10 minutes. I did in 4 minutes.
2nd section had 2 coding questions which had to be done within 70 minutes. One was related to merge two sorted Linked Lists and second question was Clone a linked List having random pointers. It was accepting only the optimized code.
I finishes 2nd section in 25 minutes. Thanks to coding Ninjas for help in practice.
3rd section had almost 50 behavioral questions which is to be finishes in 35 minutes.
4th section was an aptitude section consisting of 25 questions which was supposed to be finished in 35 minutes. Questions were mainly to check your analytical skills.



The given linked lists may or may not be null.
If the first list is: 1 -> 4 -> 5 -> NULL and the second list is: 2 -> 3 -> 5 -> NULL
The final list would be: 1 -> 2 -> 3 -> 4 -> 5 -> 5 -> NULL
This was easy because I have solved it in codezen already. I used 2 pointers head and tail and initially they were NULL. Then I compared the head of 2 given linked lists and one which was smaller will be the new head of my sorted linked lists. Then I applied simple merge function of the merge sort while comparing elements and adding to my linked lists accordingly.




There are 2 solutions for it. I have used the optimized one. Created the copy of node 1 and insert it between node 1 & node 2 in original Linked List, create a copy of 2 and insert it between 2 & 3. I Continued in this fashion till the end, add the copy of N after the Nth node. Now I copied the random link in this way
original->next->random= original->random->next;
Now I restored the original and copy linked lists in this way in a single loop.
original->next = original->next->next;
copy->next = copy->next->next;
Ensure that original->next is NULL and return the cloned list's head pointer.
It was also a DSA round on Amazon Chime with an SDE-2 guy from amazon. It was for 40 minutes and he asked me to turn my web camera on and he shared a screen with me for code pair.


Subsequences of string "abc" are: ""(empty string), a, b, c, ab, bc, ac, abc.
I told him 2 approach. One was based on sorting in nlogn time. He told me to optimize it. I did it in linear time using hashing. He was satisfied with it.



Suppose given input is "abacb", then the length of the longest substring without repeating characters will be 3 ("acb").
There are 3 ways to solve it. One is use 2 loops i,j from zero to length of the string. Check if string from i to j have unique character or not.
It was based on CS core subjects as well as 1 coding question based on dynamic programming. Interview was with one Amazonian who was an SDE 2 there.
To make concurrency cheaper, the execution aspect of process is separated out into threads. As such, the OS now manages threads and processes
Kernel-Level threads make concurrency much cheaper than process because, much less state to allocate and initialize. However, for fine-grained concurrency, kernel-level threads still suffer from too much overhead.
When the processes are ready to execute, they are pushed into the ready queue. The short term scheduler runs in the CPU and is used for selecting a single process from the ready queue for execution. A process dispatcher gives control of the CPU to a process selected by the short term scheduler.
Shortest Job First (SJF) Scheduling Algorithm is based upon the burst time of the process. The processes are put into the ready queue based on their burst times. In this algorithm, the process with the least burst time is processed first. The burst time of only those processes is compared that are present or have arrived until that time. It is also non-preemptive in nature. Its preemptive version is called Shortest Remaining Time First (SRTF) algorithm.
Round-Robin (RR) Scheduling Algorithm is particularly designed for time sharing systems. The processes are put into the ready queue which is a circular queue in this case. In this case a small unit of time known as time quantum is defined. The algorithm selects the first process from the queue and executes it for the time defined by the time quantum. If the process has burst time less than the time quantum then the CPU executes the next process but if it has burst time higher than the time quantum then the process is interrupted and next process is executed for same time quantum. If a process is interrupted then a context switch happens and the process is put back at the tail of the queue. It is preemptive in nature.
It depends on the requirment.
Select salary from employee order by desc limit 3,1



As the answer can be large, return your answer modulo 10^9 + 7.
Can you solve this using not more than O(S) extra space?

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you remove whitespace from the start of a string?