Tip 1 : Don't waste much time on easy questions
Tip 2 : If you can't make a solution to the problem. Check out other's solution
Tip 3 : Do some good projects
Tip 1 : Write only those skills in which you are confident
Tip 2 : Have a variety of achievements in your resume
This was an online coding round with 2 coding questions.



Input: 'n' = 3, 'k' = 2 and 'arr' = {1, 2, 3}
Output: 2
Explanation: The maximum possible minimum distance will be 2 when 2 cows are placed at positions {1, 3}. Here distance between cows is 2.
I solved this question earlier so directly code the binary search solution


let 'ARR' = [1, 2, 3] then the possible subarrays of 'ARR' will be - {1}, {2}, {3}, {1, 2}, {2, 3}, {1, 2, 3}.
I soled this problem through DP.
This was the first interview round. Focused mainly on problem solving and oops.



1. K is a non-negative integer.
2. Absolute Difference between two integers A and B is equal to the difference of maximumOf(A, B) and minimumOf(A, B).
3. Pair of integers should have different indices in the array.
What is thrashing?
Tell about different paging mechanisms.
This was the second interview round.



If there are any duplicates in the given array we will count only one of them in the consecutive sequence.
For the given 'ARR' [9,5,4,9,10,10,6].
Output = 3
The longest consecutive sequence is [4,5,6].
Can you solve this in O(N) time and O(N) space complexity?



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.

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?