Tip 1: Solve at least two DSA questions every day.
Tip 2: Keep notes of your approach and revise them twice a week.
Tip 3: Focus on understanding and building the logic on your own.
Tip 1: Use action keywords to improve your resume’s ranking.
Tip 2: Use numerical indicators to show the results or impact of your projects.

Input: 'n' = 5 , ‘arr’ = [3, 4, 5, 1, 2]
Output: 3
Explanation:
If we rotate the array [1 ,2, 3, 4, 5] right '3' times then we will get the 'arr'. Thus 'r' = 3.
I used a straightforward brute-force approach. Since the array was originally sorted in ascending order, I traversed it once while keeping track of the minimum element and its index. The index at which this minimum element occurred was the answer.

My approach is simple and linear. I initialize a counter to zero and then traverse both strings character by character. At each index, I check if the characters are different, and if so, I increment the counter. After completing the traversal, the counter gives the total number of differing positions.


1. get(key) - Return the value of the key if the key exists in the cache, otherwise return -1.
2. put(key, value), Insert the value in the cache if the key is not already present or update the value of the given key if the key is already present. When the cache reaches its capacity, it should invalidate the least recently used item before inserting the new item.
Type 0: for get(key) operation.
Type 1: for put(key, value) operation.
1. The cache is initialized with a capacity (the maximum number of unique keys it can hold at a time).
2. Access to an item or key is defined as a get or a put operation on the key. The least recently used key is the one with the oldest access time.
Solved the Least Recently Used (LRU) Cache problem by designing an efficient cache system with O(1) operations. Implemented a combination of a HashMap for quick key-value access and a doubly linked list to maintain the order of recently used elements. Ensured that every access (get) updates the usage order, and during insertion (put), handled capacity constraints by removing the least recently used item. This approach optimizes both performance and memory management while strictly following the LRU eviction policy.
The topic for the discussion was “How to design a hiring process that minimizes cheating and ensures fair evaluation.”
How do you get a lion, a goat, and a cabbage across a river using a single-passenger boat without any of them eating each other?
Tip 1: Go through the most frequently asked interview puzzles.
Tip 2: Stay calm and try to understand the problem without hesitation.



Do not allocate extra space for another array. You need to do this by modifying the given input array in place with O(1) extra memory.
'n' = 5, 'arr' = [1 2 2 2 3].
The new array will be [1 2 3].
So our answer is 3.
Create an auxiliary array temp[] to store unique elements.
Traverse the input array and copy unique elements of arr[] to temp[] one by one. Also, keep track of the count of unique elements; let this count be j.
Copy the first j elements from temp[] back to arr[] and return j.
The interviewer was polite.
The interviewer started by asking about my project and the problem I was trying to solve.
They asked how I use AI in my daily life.
They also asked how I would approach the problem of finding the population of Kanpur.
Tip 1: Stay calm and confident, even if you are unable to answer.
Tip 2: Be thorough with your project, as questions may be asked multiple times.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
Which traversal uses a queue as its primary data structure?