#learning
Read more stories on Hashnode
Articles with this tag
Single number · Q25:Given a non-empty array of integers nums, every element appears twice except for one. Find that single one. You must implement a...
Majority element II · Q6:)Given an integer array of size n, find all elements that appear more than ⌊ n/3 ⌋ times. Example: Input: nums = [3,2,3] Output:...
Majority element · Q5:)Given an array nums of size n, return the majority element.The majority element is the element that appears more than ⌊n / 2⌋...
Maximum Product of subarray · Q4:)Given an integer array, find a subarray that has the largest product, and return the product. The test cases are...
Maximum Subarray · Q3: Given an integer array nums, find the subarray with the largest sum, and return its sum. Example 1: Input: nums =...
Squares of sorted array · Given an integer array nums sorted in non-decreasing order, return an array of the squares of each number sorted in...