Tip 1 - Practice at least 250 Questions.
Tip 2 - Do at least 2 projects.
Tip 1 : Have some projects on resume.
Tip 2 : Do not put false things on resume.



1. The array consists of only 3 distinct integers 0, 1, 2.
2. The array is non-empty.
Wrote pseudocode for it and explained the algorithm in simple terms. Mentioned that merge sort and quick sort are better. However, merge sort will use more memory and I explained how the worst case of quick sort can be avoided by using a random pivot.
You have a set of 10 weights, each weighing 10g. There are 10 such sets. However, one set contains 10 weights of 9g. Determine the set with the 9g weights by using a weighing scale only once.
Solution: Take 1 weight from set 1, 2 weights from set 2, and so on up to 10 weights from set 10. Place all of them on the weighing scale at once. Subtract the weight on the scale from 100g to determine which set contains the 9g weights.
Tip 1 : Practice such questions from online platforms.



F(n) = F(n-1) + F(n-2),
Where, F(1) = F(2) = 1.
For ‘N’ = 5, the output will be 5.
Given a number N, figure out if it is a member of fibonacci series or not. Return true if the number is member of fibonacci series else false.
Fibonacci Series is defined by the recurrence.
F(n) = F(n-1) + F(n-2)
where F(0) = 0 and F(1) = 1



Given a singly linked list, you must detect the loop and remove it from the linked list if present. You need to make changes to the given linked list itself and return the updated linked list. Expected Complexity: Aim for O(n) time complexity and O(1) space complexity, where n is the number of nodes in the linked list.



Find and print the total weight of the Minimum Spanning Tree (MST) using Kruskal's algorithm. By definition, a minimum weight spanning tree is a subset of the edges of a connected, edge-weighted, undirected graph that connects all the vertices together without any cycles and with the minimum possible total edge weight.



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.

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