Tip 1: Do not panic when you encounter a question you've never seen before.
Tip 2: Remember, if nothing works, brute force is your friend.
Tip 3: Set a target.
Tip 1: Make sure your resume is short and crisp.
Tip 2: Ensure your ATS score isn't low.
It was a coding round.



It is possible for Mr. X to rob the same amount of money by looting two different sets of houses. Just print the maximum possible robbed amount, irrespective of sets of houses robbed.
(i) Given the input array arr[] = {2, 3, 2} the output will be 3 because Mr X cannot rob house 1 (money = 2) and then rob house 3 (money = 2), because they are adjacent houses. So, he’ll rob only house 2 (money = 3)
(ii) Given the input array arr[] = {1, 2, 3, 1} the output will be 4 because Mr X rob house 1 (money = 1) and then rob house 3 (money = 3).
(iii) Given the input array arr[] = {0} the output will be 0 because Mr. X has got nothing to rob.
I wrote the brute force approach, optimized it using DSA, and checked for edge cases."
I was asked two questions: one was based on the BFS algorithm, and the second was on DP.



Create a hash set of numbers in the array.
Iterate over the array.
Check for missing elements in the hash set; otherwise, the missing number is nums.length + 1.



For Amount = 70, the minimum number of coins required is 2 i.e an Rs. 50 coin and a Rs. 20 coin.
It is always possible to find the minimum number of coins for the given amount. So, the answer will always exist.
Create a DP array initialized with an impossible value.
Set the base case: dp[0] = 0.
Try each coin and update the minimum number of coins.

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?