Author: ACMer
You are driving a vehicle that has capacity empty seats initially available for passengers. The vehicle only drives east (ie. it cannot turn around and drive west.) Given a …
Given an array A of integers, we must modify the array in the following way: we choose an i and replace A with -A, and we repeat this process …
Let’s say, if we want to expand strings that contain dynamic variables, we can use regular expression to do this easily. const varContent = { VAR: "World", } console.log(expand("Hello, …
Given a year Y and a month M, return how many days there are in that month. Example 1: Input: Y = 1992, M = 7 Output: 31 Example …
A Leap year occurs mostly every 4 years, but every 100 years, we skip a leap year, unless it is divisible by 400. Leap Year Algorithm if (year is …