Given a linked list, write a function to reverse every k nodes (where k is an input to the function)....
The diameter/width of a tree is defined as the number of nodes on the longest path between two end nodes....
Write a C++ program for a given two Linked Lists, create union and intersection lists that contain union and intersection of the elements present in the given lists. The order of elements in output lists doesn’t matter.Example:...
Given a set of strings, find the longest common prefix....
Given k linked lists each of size n and each list is sorted in non-decreasing order, merge them into a single sorted (non-decreasing order) linked list and print the sorted linked list as output.Examples:...
Given k linked lists each of size n and each list is sorted in non-decreasing order, merge them into a single sorted (non-decreasing order) linked list and print the sorted linked list as output.Examples:...
Recently VMware visited our campus for full time and intern positions. There was a CGPA cut off of 7/10 for attending VMware’s hiring process....
We recommend reading the following posts as a prerequisite for this post.K’th Smallest/Largest Element in Unsorted Array K’th Smallest/Largest Element in Unsorted Array | Expected Linear TimeGiven an array and a number k where k is smaller than the size of the array, we need to find the k’th smallest element in the given array. It is given that all array elements are distinct.Examples:...
Prerequisite: K’th Smallest/Largest Element in Unsorted Array | Set 1...
VMware visited our campus in October. Around 70 students from our college registered for the VMware placement drive....