#array
Read more stories on Hashnode
Articles with this tag
Given an array nums with n objects colored red, white, or blue, sort them in-place so that objects of the same color are adjacent, with the colors in...
Given two arrays arr1 and arr2, the elements of arr2 are distinct, and all elements in arr2 are also in arr1. Sort the elements of arr1 such that the...
A school is trying to take an annual photo of all the students. The students are asked to stand in a single file line in non-decreasing order by...
You are given an integer array nums and an integer k. In one operation, you can choose any index i where 0 <= i < nums.length and change nums[i] to...
Given two 0-indexed integer arrays nums1 and nums2, return a list answer of size 2 where: answer[0] is a list of all distinct integers in nums1 which...
Given a string s which consists of lowercase or uppercase letters, return the length of the longest palindrome that can be built with those...