Software Developer Ii Interview Questions

3,997 software developer ii interview questions shared by candidates

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.
avatar

Software Engineer II

Interviewed at Microsoft

4
Jan 1, 2022

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.

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.
avatar

Software Engineer II

Interviewed at Microsoft

4
Oct 31, 2025

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.

Viewing 1301 - 1310 interview questions

See Interview Questions for Similar Jobs

Glassdoor has 3,997 interview questions and reports from Software developer ii interviews. Prepare for your interview. Get hired. Love your job.