LeetCode 1220. Count Vowels Permutation (Solution) – New

Introduction Strings are a fascinating topic in computer science, offering a myriad of challenges and puzzles. One intriguing problem is understanding the permutations of vowels under specific rules. In the “1220. Count Vowels Permutation” problem, we are tasked with counting the number of possible strings of length ‘n’ formed under certain constraints related to vowel … Read more

LeetCode 5. Longest Palindromic Substring (Solution)

Introduction Finding the longest palindromic substring might seem challenging at first, but with the right approach, it’s quite manageable. LeetCode categorizes this problem as having a medium difficulty level. While one could resort to the naive method, it’s worth considering more efficient solutions. Intuition Initially, one might consider examining the longest possible palindrome at the … Read more

LeetCode 823. Binary Trees With Factors (Solution)

Introduction In the intricate realm of algorithmic challenges, there exists a genre of problems that often bewilder many: constructing structures or entities using given constraints. One such fascinating puzzle is the “Binary Trees With Factors” problem, which invites us to explore the vast world of binary trees created from a list of numbers. At its … Read more

LeetCode 15. 3Sum

In the previous post, we discussed the Two Sum problem. Please check it out below:LeetCode 1. Two Sum You can use either a two-pointer approach or a hashmap for this. Let’s try to reuse the Two Sum solution! Approach Throughout the iteration, we can simply look for a pair of numbers that sum up to … Read more

Coding

I found other people’s solutions quite useful and helpful. I would like to provide my own solutions here in return. Most of the problems will be from Leetcode or BoJ. Later I would like to upload junior math solutions for my students.