#### Leetcode Gray Code problem solution

In the Leetcode Gray Code problem solution An n-bit gray code sequence is a sequence of 2n integers where: Every integer is in the inclusive range [0, 2n - 1],The first integer is 0,An integer ...

#### Leetcode Merge Sorted Array problem solution

In the Leetcode Merge Sorted Array problem solution, You are given two integer arrays nums1 and nums2, sorted in non-decreasing order, and two integers m and n, representing the number of elements...

#### Leetcode Scramble String problem solution

In the Leetcode Scramble String problem solution, We can scramble a string s to get a string t using the following algorithm: If the length of the string is 1, stop.If the length of the string ...

#### Leetcode Partition List problem solution

In the Leetcode Partition List problem solution Given the head of a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You sho...

#### Leetcode Maximal Rectangle problem solution

In the Leetcode Maximal Rectangle problem solution Given a rows x cols binary matrix filled with 0's and 1's, find the largest rectangle containing only 1's and return its area. Example 1: I...

#### Leetcode Gray Code problem solution

In the Leetcode Gray Code problem solution An n-bit gray code sequence is a sequence of 2n integers where: Every integer is in the inclusive range ,The first integer is…

#### Leetcode Merge Sorted Array problem solution

In the Leetcode Merge Sorted Array problem solution, You are given two integer arrays nums1 and nums2, sorted in non-decreasing order, and two integers m and n, representing the number…

#### Leetcode Scramble String problem solution

In the Leetcode Scramble String problem solution, We can scramble a string s to get a string t using the following algorithm: If the length of the string is 1,…

#### Leetcode Partition List problem solution

In the Leetcode Partition List problem solution Given the head of a linked list and a value x, partition it such that all nodes less than x come before nodes…

#### Leetcode Maximal Rectangle problem solution

In the Leetcode Maximal Rectangle problem solution Given a rows x cols binary matrix filled with 0's and 1's, find the largest rectangle containing only 1's and return its area.…

#### Leetcode Largest Rectangle in Histogram problem solution

In the Leetcode Largest Rectangle in Histogram problem solution Given an array of integers heights representing the histogram's bar height where the width of each bar is 1, return the…

#### Leetcode Remove Duplicates from Sorted List problem solution

In the Leetcode Remove Duplicates from Sorted List problem solution Given the head of a sorted linked list, delete all duplicates such that each element appears only once. Return the…

#### Leetcode Remove Duplicates from Sorted List II problem solution

In the Leetcode Remove Duplicates from Sorted List II problem solution Given the head of a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers…

#### Leetcode Search in Rotated Sorted Array II problem solution

In the Leetcode Search in Rotated Sorted Array II problem solution, There is an integer array nums sorted in non-decreasing order (not necessarily with distinct values). Before being passed to…

#### Leetcode Remove Duplicates from Sorted Array II problem solution

In the Leetcode Remove Duplicates from Sorted Array II problem solution Given an integer array nums sorted in non-decreasing order, remove some duplicates in place such that each unique element…