Tip 1 : Mention some good projects on resume
Tip 2 : Be confident
Tip 3 : Good with computer science basics and ds and algo
Tip 1 : Good Projects
Tip 2 : Having some achievements is plus point



You are given a binary tree having 'N' nodes. Each node of the tree has an integer value. Your task is to find the maximum possible sum of a simple path between any two nodes (possibly same) of the given tree.
A simple path is a path between any two nodes of a tree, such that no edge in the path is repeated twice. Sum of a simple path is defined as the summation of all node values in a path.



1. The length of each array is greater than zero.
2. Both the arrays are sorted in non-decreasing order.
3. The output should be in the order of elements that occur in the original arrays.
4. If there is no intersection present then return an empty array.
You are given two arrays 'A' and 'B' of size 'N' and 'M' respectively. Both these arrays are sorted in non-decreasing order. You have to find the intersection of these two arrays.
Intersection of two arrays is an array that consists of all the common elements occurring in both arrays.



If X is 6 and C is 3, the sequence becomes 6,9,12,15,18,21,24…
You’re given three integers X, C, and Y, where X denotes the first term of an arithmetic sequence whose common difference is C. Your task is to determine whether Y belongs to this arithmetic sequence or not.



Input: 'a' = [7, 12, 1, 20]
Output: NGE = [12, 20, 20, -1]
Explanation: For the given array,
- The next greater element for 7 is 12.
- The next greater element for 12 is 20.
- The next greater element for 1 is 20.
- There is no greater element for 20 on the right side. So we consider NGE as -1.
You have been given an array/list ‘ARR’ consisting of ‘N’ positive integers. Your task is to return the Next Greater Element(NGE) for every element.
The Next Greater Element for an element ‘X’ is the first element on the right side of ‘X’ in the array 'ARR', which is greater than ‘X’. If no such element exists to the right of ‘X’, then return -1.
Define Process and Threads in OS.
Process : A process is an instance of a program that is being executed. When we run a program, it does not execute directly. It takes some time to follow all the steps required to execute the program, and following these execution steps is known as a process.
A process can create other processes to perform multiple tasks at a time; the created processes are known as clone or child process, and the main process is known as the parent process. Each process contains its own memory space and does not share it with the other processes. It is known as the active entity.
Thread : A thread is the subset of a process and is also known as the lightweight process. A process can have more than one thread, and these threads are managed independently by the scheduler. All the threads within one process are interrelated to each other. Threads have some common information, such as data segment, code segment, files, etc., that is shared to their peer threads. But contains its own registers, stack, and counter.



Let arr=[-1,-1,-2,4,3]
We can take the subset {-1,-2,4,3} which will have the product as 24. We can verify that this is the largest product possible. Hence we return 24.
You are given an array/list ‘arr’ of size ‘n’. Your task is to find the maximum product possible by taking any subset of the array/list ‘arr’.
Since the product can be large, return it modulo 10^9+7

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is the purpose of the return keyword?