# 507

Sollicitatievragen voor Linux Engineer gedeeld door sollicitanten

## Meest gestelde sollicitatievragen

Sorteren: Relevantie|Populair|Datum
Er werd een Linux Kernel Engineer gevraagd...5 juni 2009

### Write a shortest string copy function.

3 antwoorden

while(str++ = dst++) {}

I should be like the following. while (*str++ = *dst++) {}

or simplified to: while(*xptr++ = *yptr++);

### Print last n nodes of a linked list you only have pointer to Head

3 antwoorden

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 Minder

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 Minder

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. Minder

### Write an algorithm to sort an array of integers in O(n) time?

3 antwoorden

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) Minder

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) ).. Minder

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. Minder

### You need to patch openssl. What is the quickest way or efficient way of installing the package?

3 antwoorden

# apt-get install pkgname , yum install pkgname, dpkg –i pkgname.deb # ./configure &amp;&amp; make &amp;&amp; make install Minder

yum install openssl for rhel

yum update openssl

### What is fstab?

3 antwoorden

Fstab is the operating system's file system where we make the entry of mount point Minder

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. Minder

By the way, the default location of which is /etc/fstab

### What do you do if you cannot ssh into a server?

3 antwoorden

run ss command to see if port 22

Verify port 22 is open using netcat

### When does the control passes from user mode to kernel mode in a Linux System?

2 antwoorden

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. Minder

### Subject were about automation, HA, performance investigation, Linux commands and how-would-you-approach-this-issue.

2 antwoorden

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 Minder

### How to check services running on your computer?

2 antwoorden

top

systemctl --type=service --state=active

### What do you stand for as a Man?

2 antwoorden

Honesty, Integrity Family

Manual pages

Weergave: 1 - 10 van 507 sollicitatievragen