↳
Make sure to highlight your ability to identity a priority problem, take initiative, and deliver an effective solution. Remember that you don't always have to solve problems alone - knowing how to seek out helpful assistance is a useful skill. Less
↳
while(str++ = dst++) {}
↳
I should be like the following. while (*str++ = *dst++) {}
↳
or simplified to: while(*xptr++ = *yptr++);
↳
I suggest to create additional pointer which is the tail. Set a gap of the n nodes between the head and tail, move both, and once the tail points to null it’s the end of the list. Then, move only the head and print the node until it reaches the tail Less
↳
Actually, that could work but it's too expensive. I suggest you to reverse the list which take O(n) time complexity afterward print first m element and reverse the list back which in total cost you O(n) time complexity and O(1) extra space Less
↳
Use a queue. Traverse the list and add each element to the queue. Always check if the size of the queue is n, if so then remove the first element before adding a new one. When you finish traversing the list your queue will have exactly the last n elements of the list, just print them in order. Less
↳
As it is array of integers radix sort can be used which has runtime of O(n). On a computer the size of integer variable is fixed, or constant, hence it become O(n). Any comparative sort will take O(n log(n)) but, the radix and buck sort are not comparative. Lets say the integer size is 32bits, then it's run time will be 32 * O(n), which is same as O(n) Less
↳
There are a number of algorithms to do this one is called bucket sort. The interview didn't indicate the answer to me, but it seemed like he was looking for heap sort (which is O(nlogn) ).. Less
↳
I believe your answer should be that no sort algorithm (on a sequential computer) can sort an array of numbers in less than O(n lg n) time. So his request couldn't be satisfied. Less
↳
Fstab is the operating system's file system where we make the entry of mount point Less
↳
Fstab is a file that contains details of all mounting points, they are mentioned there to make sure the mounting points stay mounted even after rebooting. Less
↳
By the way, the default location of which is /etc/fstab
↳
netcat -zv server_address 22
↳
run ss command to see if port 22
↳
Verify port 22 is open using netcat
↳
System calls ,H/w Interrupts and last which I did not mention was Exceptions
↳
Well! Exceptions are software interrupts which are synchronous while HW interrupts are asynchronous and caused by hardware devices connected to machine. Both types of interrupts are taken care by their respective interrupt handlers, the top halves. In either case, to service interrupts, execution switches from user space to kernel space. Less
↳
It's very specific based on the scenario. Think global when preparing.
↳
There's quite an extended back and forth in actual interviews for questions like this, so nothing quite like real practice. The Prepfully Adyen Linux Systems Engineer experts have actually worked in this role, so they're able to do an honest-to-God accurate mock, which really puts you through the paces. prepfully.com/practice-interviews Less
↳
top
↳
systemctl --type=service --state=active