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.
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->nex...
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 ...
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.
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...
It depends on the requirment.
Select salary from employee order by desc limit 3,1