#arrays
Read more stories on Hashnode
Articles with this tag
Given an integer array nums, return the number ofreverse pairsin the array. (link) A reverse pair is a pair (i, j) where: 0 <= i < j < nums.length...
Problem Given an array of intervals where intervals[i] = [starti, endi], merge all overlapping intervals, and return an array of the non-overlapping...
Given an array nums of n integers, return an array of all the unique quadruplets [nums[a], nums[b], nums[c], nums[d]] such that: 0 <= a, b, c, d <...
Given an integer numRows, return the first numRows of Pascal's triangle. (link) In Pascal's triangle, each number is the sum of the two numbers...
Problem Statement Given an array of integers nums and an integer k, return the total number of subarrays whose sum equals to k. A subarray is a...
Problem Statement Given an m x n matrix, return all elements of the matrix in spiral order. (link) Example 1: Input: matrix =...