Find K Closest Elements - LeetCode Given a sorted integer array arr, two integers k and x, return the k closest integers to x in the array. …
Intersection of Two Arrays - LeetCode Given two integer arrays nums1 and nums2, return an array of their intersection. Each element in the result must be unique and you may return the result in any order. …
Contains Duplicate II - LeetCode Given an integer array nums and an integer k, return true if there are two distinct indices i and j in the array such that nums[i] == nums[j] and abs(i - j) <= k. …
Minimum Size Subarray Sum - LeetCode Given an array of positive integers nums and a positive integer target, return the minimal length of a subarray whose sum is greater than or equal to target. …
Repeated DNA Sequences - LeetCode The DNA sequence is composed of a series of nucleotides abbreviated as 'A', 'C', 'G', and 'T'. …
Longest Substring Without Repeating Characters - LeetCode Given a string s, find the length of the longest substring without repeating characters. …
Majority Element - LeetCode Given an array nums of size n, return the majority element. The majority element is the element that appears more than [n / 2] times. …
Longest Substring with At Least K Repeating Characters - LeetCode Given a string s and an integer k, return the length of the longest substring of s such that the frequency of each character in this substring is greater than or equal to k. …
Search Insert Position - LeetCode Given a sorted array of distinct integers and a target value, return the index if the target is found. …
Find Peak Element - LeetCode A peak element is an element that is strictly greater than its neighbors. Given a 0-indexed integer array nums, find a peak element, and return its index. …