3Sum losest (LeetCode)
Given an integer array nums of length n and an integer target, find three integers in nums such that the sum is closest to target.
Given an integer array nums of length n and an integer target, find three integers in nums such that the sum is closest to target.
Given an array nums of n integers, return an array of all the unique quadruplets [nums[a], nums[b], nums[c], nums[d]]
This is a solution to the Assign Cookies problem on LeetCode.
Given two version strings, compare them. Return -1, 1, or 0 based on the comparison.
Given n non-negative integers representing the heights of vertical lines, find the two lines that together with the x-axis form a container, such that the container contains the most water.
This is a solution to the Count Binary Substrings problem on LeetCode.
This is a solution to count the pairs whose sum is less than target on LeetCode.
This is a solution to the problem of counting subarrays with product less than a given value K.
Check if any substring of length 2 in a string is also present in its reverse.
This is a solution to the Find First Palindromic String in the Array in leetcode
Given an array of N + 1 size, where each element is between 1 and N. Assuming there is only one duplicate number, your task is to find the duplicate number.
This document explores different approaches to solving the problem of finding a triplet in an array that sums up to zero, including solutions in JavaScript, TypeScript, Python, Java, and C++.
Problem Description
This document provides a solution for Happy Number problem on LeetCode.
This is a solution to the heaters problem on LeetCode.
Solution to Leetcode 349. Intersection of Two Arrays
Solution to Leetcode 350. Intersection of Two Arrays II
This is a solution to Is Subsequence in leetcode
Problem Description
This is a solution to the longest word in dictionary through deleting problem on LeetCode.
This is a solution to the Merge Strings Alternately problem on LeetCode.
Given two sorted linked lists, merge them into a single sorted linked list.
This document provides solutions for the Minimum Average of Smallest and Largest Elements problem.
This is a solution to minimum common value in leetcode
Determine the minimum number of levels Alice should play to gain more points than Bob, given that some levels are impossible to clear.
This document provides solutions for the Minimum Operations to Make Binary Array Elements Equal to One II problem on LeetCode.
This is a solution to the move zeroes in leetcode
Given an integer array nums, move all 0's to the end of it while maintaining the relative order of the non-zero elements.
This is a solution to the Number of Arithmetic Triplets in leetcode
Solve the problem of counting the number of words that are subsequences of a given string using various efficient methods.
Solution to finding the paint House.
This is a solution to the Partition Array into Disjoint Intervals problem on LeetCode.
This document provides solutions for the Partition Array Into Three Parts With Equal Sum problem.
Given a sorted integer array, remove duplicates in-place and return the new length of the array with unique elements.
Given an integer array nums sorted in non-decreasing order, remove some duplicates in-place such that each unique element appears at most twice.
This is a solution to the Remove Duplicates from Sorted List problem on LeetCode.
Given the head of a linked list, remove the nth node from the end of the list and return its head.
This is a solution to the Reorder List problem on LeetCode.
This is a solution to the Reverse Only Letters problem on LeetCode.
This is a solution to the Reverse String II problem on LeetCode.
This is a solution to the Reverse Vowels of a String problem on LeetCode.
Given an input string s, reverse the order of the words.
This is a solution to the Reverse Words in a String III problem on LeetCode.
The rotate list is the problem to rotate the list to the right by k places.
Solution to finding the shortest distance between two words in an array of strings.
Solution to finding the shortest distance between two words in an array of strings.
This is a solution to the Shortest Word Distance problem on LeetCode.
Problem Description
This is a solution to the String Compression problem on LeetCode.
Solution to finding the Strobogrammatic Number in an array of strings.
A concatenated string is a string that exactly contains all the strings of any permutation of `words` concatenated.
Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it can trap after raining.
Given a 1-indexed array of integers numbers that is already sorted in non-decreasing order, find two numbers such that they add up to a specific target number.
This is a solution to the Valid Triangle Number problem on LeetCode.
Solution to finding and Verify Preorder Sequence in Binary Search Tree.