Tip 1: Prepare your resume well.
Tip 2: Deploy your projects so that the interviewer can view them. Also, provide a hyperlink on your resume.
Tip 3: Be thorough with Data Structures and Algorithms. Also, prepare well for topics such as OS and DBMS.
Tip 1: Deploy your projects so that the interviewer can view them. Also, provide a hyperlink on your resume.
Tip 2: It's not important to have fancy projects. Only mention those in which you're confident.
There are no negative markings for incorrect answers.



1. The given graph may have self-loops and parallel edges.
Consider ‘N’ = 4, ‘EDGES’ = [[0, 1], [0, 3], [1, 2], [3, 2]], ‘SRC’ = 0 and ‘DEST’ = 2. The given directed graph is shown below.

Here, all the paths that start from node 0 are -:
1. 0->1->2
2. 0->3->2
Both of these paths eventually end at node ‘2’ i.e node ‘DEST’. Thus we should return True.
The idea is to do Depth First Traversal of the given directed graph.
Start the DFS traversal from the source.
Keep storing the visited vertices in an array or HashMap say ‘path[]’.
If the destination vertex is reached, print the contents of the path[].
The important thing is to mark current vertices in the path[] as visited also so that the traversal doesn’t go in a cycle.



Input: Given linked list is:

Output:
1 → 2 → 3 → 4 → 5 → 6 → 7 → 8 → 9 → 12 → 20 → null.
Explanation:
The returned linked list should be in a sorted order. All the elements in this returned linked list are connected by 'child' pointers and 'next' pointers point to null.
PROGRAM:
Node*merge(Node*a,Node*b){//a=root b=root ka right wala
if(a==NULL)return b;
if(b==NULL)return a;
Node*res;
if(a->datadata)
{
res=a;
res->bottom=merge(a->bottom,b);
}
else{
res=b;
res->bottom=merge(a,b->bottom);
}
res->next=NULL;
return res;
}
Node *flatten(Node *root)
{
if(root==NULL || root->next==NULL)return root;
return merge(root,flatten(root->next));
}



For the given arr[ ] = { 1, 2, 3, 1}
After 0 rotation arr[ ] = { 1, 2, 3, 1} the sum is = (0 *1 + 1 * 2 + 2 * 3 + 3 * 1) = 11.
After 1 rotation arr[ ] = { 1, 1, 2, 3} the sum is = (0 *1 + 1 * 1 + 2 * 2 + 3 * 3) = 14.
After 2 rotation arr[ ] = { 3, 1, 1, 2} the sum is = (0 *3 + 1 * 1 + 2 * 1 + 3 * 2) = 9.
After 3 rotation arr[ ] = { 2, 3, 1, 1} the sum is = (0 *2 + 1 * 3 + 2 * 1 + 3 * 1) = 8.
So the maximum sum is 14 when arr[ ] = { 1, 1, 2, 3}.
Sorting each row of the array and picking up the maximum element from each to get the maximum sum.



1. Constructor:
It initializes the data members(queues) as required.
2. push(data) :
This function should take one argument of type integer. It pushes the element into the stack and returns nothing.
3. pop() :
It pops the element from the top of the stack and, in turn, returns the element being popped or deleted. In case the stack is empty, it returns -1.
4. top :
It returns the element being kept at the top of the stack. In case the stack is empty, it returns -1.
5. size() :
It returns the size of the stack at any given instance of time.
6. isEmpty() :
It returns a boolean value indicating whether the stack is empty or not.
Query-1(Denoted by an integer 1): Pushes an integer data to the stack. (push function)
Query-2(Denoted by an integer 2): Pops the data kept at the top of the stack and returns it to the caller. (pop function)
Query-3(Denoted by an integer 3): Fetches and returns the data being kept at the top of the stack but doesn't remove it, unlike the pop function. (top function)
Query-4(Denoted by an integer 4): Returns the current size of the stack. (size function)
Query-5(Denoted by an integer 5): Returns a boolean value denoting whether the stack is empty or not. (isEmpty function)
Operations:
1 5
1 10
2
3
4
Enqueue operation 1 5: We insert 5 at the back of the queue.
Queue: [5]
Enqueue operation 1 10: We insert 10 at the back of the queue.
Queue: [5, 10]
Dequeue operation 2: We remove the element from the front of the queue, which is 5, and print it.
Output: 5
Queue: [10]
Peek operation 3: We return the element present at the front of the queue, which is 10, without removing it.
Output: 10
Queue: [10]
IsEmpty operation 4: We check if the queue is empty.
Output: False
Queue: [10]
Make sure that the newly entered element is always at the front of ‘q1’ so that the pop operation just dequeues from ‘q1’. ‘q2’ is used to put every new element at the front of ‘q1’.
What is a kernel? (Learn)
A kernel is the core component of an operating system that acts as a bridge between the computer's hardware and software. It is responsible for managing system resources, providing essential services, and facilitating communication between software applications and the computer's hardware components. The kernel is loaded into the computer's memory during the boot process and remains in memory throughout the system's operation.



An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase. We can generalize this in string processing by saying that an anagram of a string is another string with the same quantity of each character in it, in any order.
{ “abc”, “ged”, “dge”, “bac” }
In the above example the array should be divided into 2 groups. The first group consists of { “abc”, “bac” } and the second group consists of { “ged”, “dge” }.



1. enqueue(x) : Adds an item x to rear of the queue
2. dequeue() : Removes an item from front of the queue
3. size() : Returns number of elements in the queue.
4. front() : Finds the front element.
Let the given queue be { 1, 2, 3, 4, 5 } and K be 3.
You need to reverse the first K integers of Queue which are 1, 2, and 3.
Thus, the final response will be { 3, 2, 1, 4, 5 }.
What problem do we face in computer systems without OS? (Learn)
Operating systems (OS) play a fundamental role in managing and facilitating the interaction between computer hardware and software. Without an operating system, several critical issues and challenges arise in a computer system, making it impractical for most users. Some of the problems faced without an operating system include:
Lack of User Interface: An operating system provides a user interface that allows users to interact with the computer. Without an OS, there would be no graphical user interface (GUI) or command-line interface (CLI), making it challenging for users to interact with applications and the system.
No Hardware Abstraction: Operating systems provide hardware abstraction, allowing software applications to interact with hardware components without needing to understand the low-level details. Without an OS, every application would have to manage hardware interactions directly, leading to complex and error-prone code.
Limited Resource Management: An OS efficiently manages system resources such as CPU, memory, and storage. Without an OS, applications would need to manage these resources individually, leading to resource conflicts, inefficiencies, and potential system crashes.
No Multitasking or Process Management: Operating systems enable multitasking, allowing multiple processes to run concurrently. Without an OS, only one application or process could run at a time, severely limiting the system's efficiency and responsiveness.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you remove whitespace from the start of a string?