Problem: Given a 2D array of integers representing a paint canvas, where each integer represents a color, write a function that takes a point in the arr…
Design a new service for users to create playlists and store songs in them. Functional requirements Users can create any number of playlists. Users can…
Robinhood is famous for its referral program. It’s exciting to see our users spreading the word across their friends and family. One thing that is inter…
Two strings are said to be similar if they are composed of the same characters. For example, “abaca” and “cba” are similar since both of them are compos…
Given an array of N integers containing integers from 1 to N only. Some numbers may appear multiple times, some numbers may not appear. Write code to pr…
Implement the functionality of the “find” command in UNIX as an API that returns a list of files matching the provided search parameters. The search sho…
Implement a queue which has addFront , addBack , popFront , popBack , and getSize in O(1) . Find out how close two words are to being anagrams of each o…
Question Statement Write a function that returns true if a given string is a palindrome (a palindrome is a string that is the same when reversed, if you…
Part 1 prompt: Stripe in Brazil is obliged to register customers’ transactions for each merchant with the central bank as an aggregated unit per day. Th…
Given an array A and a number b. Return a reordered array such that all numbers before b are smaller than or equal to b, and all numbers after b are gre…
Imagine you work at a recruitment company and are asked to develop a talent listings service designed to fan out user profiles seeking employment by pub…
You have an array containing N elements, and each element has a score. In each step, you can pop an element from the leftmost or the rightmost position…
Given an array of integers, find any one local minimum in the array. A local minimum is defined as an integer in the array that is less than or equal to…
Firewall Rules You are given a list of firewall rules. Each rule contains an action, either ALLOW or DENY , and an IPv4 address or CIDR block. Determine…
We have Uber HCV (High Capacity Vehicles) plying on the same routes in loops. Every route has a certain number of stops. The routes are represented as a…