Tag: C++ coding exercise
Given a string date representing a Gregorian calendar date formatted as YYYY-MM-DD, return the day number of the year. Example 1: Input: date = “2019-01-09” Output: 9 Explanation: Given …
Given an array nums of n integers and an integer target, are there elements a, b, c, and d in nums such that a + b + c + …
On a broken calculator that has a number showing on its display, we can perform two operations: Double: Multiply the number on the display by 2, or; Decrement: Subtract …
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 …
The Tribonacci sequence Tn is defined as follows: T0 = 0, T1 = 1, T2 = 1, and Tn+3 = Tn + Tn+1 + Tn+2 for n >= 0. …