Missing Number
Missing Number: Given an array nums containing n distinct numbers in the range [0, n], return the only number in the range that is missing from the array.
Missing Number: Given an array nums containing n distinct numbers in the range [0, n], return the only number in the range that is missing from the array.
Longest Consecutive Sequence: Given an unsorted array of integers nums, return the length of the longest consecutive elements sequence. You must write an algorithm that runs in O(n) time. Example…
Find the Duplicate Number: Given an array of integers nums containing n + 1 integers where each integer is in the range [1, n] inclusive. There is only one repeated…
Find All Numbers Disappeared in an Array: Given an array nums of n integers where nums[i] is in the range [1,n], return an array of all the integers in the…
Find All Duplicates In Array: Given an integer array nums of length n where all the integers of nums are in the range [1, n] and each integer appears once…
Convert 1D Array into 2D Array: You are given a 0-indexed 1-dimensional (1D) integer array original, and two integers, m and n. You are tasked with creating a 2-dimensional (2D)…