LeetCode 119. Pascal’s Triangle II

Definition In mathematics, Pascal’s triangle is a triangular array of the binomial coefficients arising in probability theory, combinatorics, and algebra. In much of the Western world, it is named after the French mathematician Blaise Pascal, although other mathematicians studied it centuries before him in Persia, India, China, Germany, and Italy. The rows of Pascal’s triangle … 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

LeetCode 1. Two Sum

Hello, all. This is the my first LeetCode solution and I am going to start with an easy one! Intuition You are to find two numbers in an array that add up to a given target. We have to return a solution and can assume that this is going to be the unique solution. Approach … 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.