Author: ACMer
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 …
The k-digit number N is an Armstrong number if and only if the k-th power of each digit sums to N. Given a positive integer N, return true if …
Given two arrays, write a function to compute their intersection. Example 1: Input: nums1 = , nums2 = Output: Example 2: Input: nums1 = , nums2 = Output: Note: …
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. …