CS-OA cs-vo Faang

Neuberger OA record


Almost Sorted

An aray of integers is almost sortedif at most one element can be deleted from it to make it perfectly sorted, ascending. For example, arays (2,171, [13), [9, 2) and [1, 5, 6)are almost sorted because they have 0or 1 elements out of place. The arrays (4, 2, 1) [1,2, 6, 4, 3)are not because theyhave more than one element out of place. Given an array of n unique integers, determine the minimum number of elements to remove so itbecomes almost sorted.

Binary Manipulation

Given an integer, store its binary representation bin as a string or an array with digits indexed from 0to length(bin)- 1. Reduce its binaryrepresentation to zero by using the following operations:

这题其实是leetcode 1611题的变种,难度较高。

  1. Avoiding Landmines
    A robot is moving on a grid of size nm. n one move, it moves one step right or one step down. Some cells of the grid have landmines, so the robothas to avoid them. The grid is aiven as an arrav ot size nm, grid n ml, where grid nim = 0means that the e has a landmine. and eridnim = 1 meansthe cellis safe to step upon. Find the number of ways in which the robot can reach the bottom-ight most cel, gridln-1/m-1], starting from the top-leftmost cell, grid[0][0]. The number can be large, so return the value modulo (109+7)
  1. Coin Flipping Probability
    Suppose a coin that has probability p of landing heads will be tossedrepeatedly.
    The task is to find the probability of getting an even number of heads in thefirst n tosses.
    The probability should be rounded to 8 decimal places.

We can assist you online with any online assessment, and we can bypass any cheating detection mechanisms, including those that require the use of a camera

contact me to slove OA


Leave a Reply

Your email address will not be published. Required fields are marked *