Tip 1 : Prepare all your projects
Tip 2 : Daily practice of aptitude
Tip 3 : Practice previous years Company questions
Tip 1 : Resume should contains only those skills that you know
Tip 2 : Add good projects and add github link to it also
Tip 3 : Resume should not be too long
The first line...
After rotating d positions to the left, the first d elements become the last d elements of the array
First store the elements from index d to N-1 into the temp array.
Then store the first d elements of the original array into the temp array.
Copy back the elements of the temp array into the original array
Traverse linked list using two-pointers. Move one pointer by one and the other pointers by two. When the fast pointer reaches the end, the slow pointer will reach the middle of the linked list.
In general, Merge Sort is the best-suited sorting algorithm for sorting linked lists efficiently.
1) Sort the elements using Merge Sort. We will soon be writing a post about sorting a linked list. O(nLogn)
2) Remove duplicates in linear time using the algorithm for removing duplicates in sorted Linked List. O(n)
Please note that this method doesn’t preserve the origin...
Consider every sub-array of size k starting from the beginning of the array and reverse it. We need to handle some special cases. If k is not multiple of n where n is the size of the array, for the last group we will have less than k elements left, we need to reverse all remaining elements. If k = 1, the array should remain unchanged. If k >= n, we reverse all elements present in the array.<...
Introduce yourself.
what was your favorite subject in your bachelors.
Do you have any other offer.
What would do if a person (is your friend) in your team is not working properly . Do you inform your manager about it?