LeetCode Solutions

#1295 Easy

Find Numbers with Even Number of Digits

Count numbers which has even number of digits.

#1920 Easy

Build Array from Permutation

You will learn in-place array transformations.

#2094 Easy

Finding 3-Digit Even Numbers

Efficient approaches to find all unique 3-digit even numbers from digits.

#3024 Easy

Type of Triangle

Determine triangle type using multiple approaches including direct comparison, sorting optimization, and set-based type detection.

#3392 Easy

Count Subarrays of Length Three With Condition

Count subarrays where sum of first and third elements equals half of the second element.

#3432 Easy

Count Partitions with Even Sum Difference

Count when sum of the left and right subarrays is even.

#3442 Easy

Maximum Difference Between Even and Odd Frequency I

Efficient approaches to find maximum difference between even and odd character frequencies in strings, including optimized single-pass methods.

#3541 Easy

Find Most Frequent Vowel and Consonant

Discover optimal methods to find maximum vowel and consonant frequencies.

#3545 Easy

Minimum Deletions for At Most K Distinct Characters

Learn optimal strategies to minimize deletions while maintaining character diversity.

#3550 Easy

Smallest Index With Digit Sum Equal to Index

Multiple approaches like Modulo Division, String Conversion Method, Precomputed Digit Sums.

#100659 Easy

Maximum Product of Two Digits

Maximum Product using digit extraction and sorting.

#73 Medium

Set Matrix Zeroes

Efficient approaches to set matrix zeroes in-place including O(1) space optimization and various implementation methods.

#838 Medium

Push Dominoes

Two efficient approaches: Force Propagation and BFS Simulation.

#1432 Medium

Max Difference You Can Get From Changing an Integer

Efficient approaches to find maximum difference from digit replacement operations, including greedy algorithms and optimized methods.

#1829 Medium

Maximum XOR for Each Query

Find the maximum XOR result for each query on an array.

#2799 Medium

Count Complete Subarrays in an Array

Count how many subarrays contain all distinct elements present in the original array.

#2918 Medium

Minimum Equal Sum of Two Arrays After Replacing Zeros

Learn optimal strategies to balance array sums by replacing zeros.

#2962 Medium

Count Subarrays Where Max Element Appears at Least K Times

Count all subarrays where the maximum element appears at least k times

#3223 Medium

Minimum Length of String After Operations

Find the minimum possible length of string after performing operations.

#3387 Medium

Maximize Amount After Two Days of Conversions

This problem requires understanding of graph algorithms and dynamic programming.

#3335 Medium

Total Characters in String After Transformations I

Efficient approaches to calculate string length after transformations using frequency mapping and mathematical optimization.

#3546 Medium

Equal Sum Grid Partition I

Learn efficient methods to partition grids into equal sums.

#3551 Medium

Minimum Swaps to Sort by Digit Sum

Efficient approaches to calculate minimum swaps for digit-sum sorting using cycle detection and custom comparators.

#3566 Medium

Partition Array into Two Equal Product Subsets

Efficient approaches to partition an array into two subsets with equal product, including prime factorization and bitmasking techniques.

#100626 Medium

Fill a Special Grid

Construct a 2N x 2N grid where each quadrant follows strict ordering rules recursively.

#2302 Hard

Count Subarrays With Score Less Than K

Count all the subarrays where product of sum and length is less than k