You are in charge of creating new bank accounts when a user signs up as an RBC customer. When creating a new bank account, a valid bank account number m…
Q1 Given a sum of money, compute the minimum number of bills and coins that equal that sum. Assume you only have the following denominations: Bills: 20,…
Given an array of integers nums and an integer k , return the total number of subarrays whose sum equals k . A subarray is a contiguous non-empty sequen…
Moving Day Description You and several roommates are coordinating a move out into several new apartments. Only two trucks of different sizes are availab…
Say we have a tournament of some sort. It doesn’t really matter what the tournament is for; all we need to know is that each game in the tournament is 1…
Your task is to write a function that, given a distance d and a stream of floating-point values received one at a time, checks for groups of three value…
Given a positive integer (including 0), convert it to its hexadecimal representation. Input: n (integer) Output: A string representing the hexadecimal v…
Part 1: Validate if a given tree is a unival tree. Part 2: Count the number of unival subtrees. A unival tree is an n-ary tree in which all nodes have t…
Given a two-dimensional array of letters, find whether a given word can be written in any one of the 8 directions. In other words, the word may appear h…
Given an input array, return a result array where each element at index i is the product of all values in the input array except input[i] . Example inpu…
Track Customer Visits and First-Time Visitors Millions of customers visit our website every day. For each customer, we have a unique identifier that sta…
Given a non-negative integer a , compute and return the truncated integer of the square root of a . Note: You are not allowed to use any built-in expone…
Max Area of Island You are given an m x n binary matrix grid . An island is a group of 1 ‘s (representing land) connected 4-directionally (horizontally…
You are a Backend Engineer at DoorDash and realized that your service can no longer keep up with traffic. In order to deal with the increased load, your…
Given a string containing uppercase characters A-Z, remove pairs of adjacent characters if they are consecutive characters in the alphabet (for example,…
We are writing software to analyze logs for toll booths on a highway. This highway is a divided highway with limited access; the only way on to or off o…
Create an employee directory structure that stores employee information for a company. Include manager direct reports. Implement the following functions…
You are asked to design a playlist shuffle system that keeps track of the last N played songs and ensures that a new song is not played again until N ot…
Sending Terminal Hardware (Part 1) Stripe operates in many countries and sends out payment terminal hardware through different shipping methods based on…