Tip 1: Focus on DSA
Tip 2: Study CS fundamentals (mainly OOP and DBMS)
Tip 1: Don't include false information in your resume.
Tip 2: Be prepared to discuss your resume.
It was a managerial round where the manager asked me about my journey and past experiences.



1. The array consists of only 3 distinct integers 0, 1, 2.
2. The array is non-empty.
Prepare some sorting algorithms before going.



Input: ‘N’ = 4, ‘arr’ = [3, 1, 2, 4], 'K' = 6
Output: 2
Explanation: The subarrays that sum up to '6' are: [3, 1, 2], and [2, 4].
1. Initialize the map.
2. Iterate through the array and check if the required subarray is found; if so, increment the answer by 1.
Problem solving.



For the given 5 intervals - [1, 4], [3, 5], [6, 8], [10, 12], [8, 9].
Since intervals [1, 4] and [3, 5] overlap with each other, we will merge them into a single interval as [1, 5].
Similarly, [6, 8] and [8, 9] overlap, merge them into [6,9].
Interval [10, 12] does not overlap with any interval.
Final List after merging overlapping intervals: [1, 5], [6, 9], [10, 12].
Intuition
If we sort the intervals by their start value, each set of intervals that can be merged will appear as a contiguous "run" in the sorted list.



In the following directed graph has a cycle i.e. B->C->E->D->B.

1. The cycle must contain at least two nodes.
2. It is guaranteed that the given graph has no self-loops in the graph.
3. The graph may or may not be connected.
4. Nodes are numbered from 1 to N.
5. Your solution will run on multiple test cases. If you are using global variables make sure to clear them.
To find cycle in a directed graph we can use the Depth First Traversal (DFS) technique. It is based on the idea that there is a cycle in a graph only if there is a back edge [i.e., a node points to one of its ancestors in a DFS tree] present in the graph.
To detect a back edge, we need to keep track of the visited nodes hat are in the current recursion stack [i.e., the current path that we are visiting]. Please note that all ancestors of a node are present in recursion call stack during DFS. So if there is an edge to an ancestor in DFS, then this is a back edge.
Problem solving.



You are given the array ‘ARR’ = [1, 1, 1, 1, 1], ‘TARGET’ = 3. The number of ways this target can be achieved is:
1. -1 + 1 + 1 + 1 + 1 = 3
2. +1 - 1 + 1 + 1 + 1 = 3
3. +1 + 1 - 1 + 1 + 1 = 3
4. +1 + 1 + 1 - 1 + 1 = 3
5. +1 + 1 + 1 + 1 - 1 = 3
These are the 5 ways to make. Hence the answer is 5.
The very basic approach is to generate all the possible pairs and check if any pair exists whose sum is equals to given target value, then increment the count variable.
What is cache, and how does a CDN work?

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