0 like 0 dislike
1,262 views

Bonus : Best Image2Pdf feature is here : https://www.desiqna.in/image2pdf/

All past online assesments of Microsoft  can be found using the tag "microsoft_oa" in the search bar.

Here is the link : https://www.desiqna.in/tag/microsoft_oa

| 1,262 views

0 like 0 dislike

# Microsoft Online Assessment (OA) - Jump Game

You are given an array of non-negative integers `arr` and a `start` index. When you are at an index `i`, you can move left or right by `arr[i]`. Your task is to figure out if you can reach value `0`.

Example 1:

Input: arr = `[3, 4, 2, 3, 0, 3, 1, 2, 1]`, start = `7`

Output: `true`

Explanation:

`left` -> `left` -> `right`

Example 2:

Input: arr = `[3, 2, 1, 3, 0, 3, 1, 2, 1]`, start = `2`

Output: `false`

by Expert (4,460 points)
0 like 0 dislike

# Microsoft Online Assessment (OA) - Unique Integers That Sum Up To 0

Given an integer `n`, return any array containing `n` unique integers such that they add up to `0`.

### Example 1:

Input:`5`

Output: `[-4,-2,0,2,4]`

### Example 2:

Input:`3`

Output: `[-2, 0, 2]`

### Example 1:

Input:`1`

Output: `[0]`

by Expert (4,460 points)