You have a river n units wide. You have a grasshopper on the left side of the river. The grasshopper wants to cross the river by jumping across it. But it's too wide, so it needs help. The river has floating stones across it. (assume they are present in a straight line.) The grasshopper can jump onto these stones and use them to cross. But there are some conditions. If the grasshopper jumps with a speed V, it can fly v-1, V, or v+1 units away from the place it jumped from. The grasshopper can't swim. If it lands in the water, it dies. The grasshopper starts on land on the left side of the river with speed v=1. Given a boolean vector to represent the stones across the river (if arr[i] is true, there is a stone at the ith position of the river)... Write a function that will return a boolean indicating if the grasshopper can cross the river.
Software Developer Ii Interview Questions
3,997 software developer ii interview questions shared by candidates
Horrible experience Cleared Online assessment, scheduled next round , HR cancelled it in last minute and never heard back from them
What are you looking for in your next role?
Question 1: Write a function to reverse bits in a number. Then write a function that: 1. Takes two numbers. 2. Reverses the order of bits in both numbers. 3. Swaps the memory locations of these two numbers. Write tests to verify your code. Question 2: You are given a singly linked list. Delete n nodes starting from a given index k. Write tests to verify your code.
JavaScript and React LLD questions
Leetcode questions + In depth questions on projects
Algorithm problem: leetcode medium System design
Q: Simulate making orders in a restaurant
Can you walk us through your error-handling strategy and explain why you chose it?
Tuples vs lists difference with use cas
Viewing 1301 - 1310 interview questions