You are working in a ball factory where you have n balls numbered from lowLimit up to highLimit inclusive (i.e., n == highLimit – lowLimit + 1), and a[……]
You are given two strings word1 and word2. Merge the strings by adding letters in alternating order, starting with word1. If a string is longer than t[……]
Given a binary string s without leading zeros, return true if s contains at most one contiguous segment of ones. Otherwise, return false.[……]
Given a m * n matrix grid which is sorted in non-increasing order both row-wise and column-wise.
Return the number of negative numbers in grid.[……]
Given the array of integers nums, you will choose two different indices i and j of that array. Return the maximum value of (nums[i]-1)*(nums[j]-1).[……]
On a 2-dimensional grid, there are 4 types of squares:
1 represents the starting square. There is exactly one starting square.
2 represents the e[……]
Given two integer arrays startTime and endTime and given an integer queryTime.
The ith student started doing their homework at the time startTime[i[……]
Given an integer n and an integer start.
Define an array nums where nums[i] = start + 2*i (0-indexed) and n == nums.length.
Return the bitwise X[……]
Given two arrays of integers nums and index. Your task is to create target array under the following rules:
Initially target array is empty.
Given an integer number n, return the difference between the product of its digits and the sum of its digits.
Input: n = 234