Generate parentheses

March 15, 2018

Given , write a function to generate all combinations of well-formed parentheses. This problem can be solved in LeetCode. Examples Solution…

Read More

Climb stairs

March 14, 2018

n개의 계단을 올라야 한다. 한번에 한칸 혹은 두칸의 계단을 올라갈 수 있다. n개의 계단을 오르려면 몇가지 경우의 수가 존재하는가? 이 문제는 LeetCode 에서 풀 수 있습니다. 예제 2개의 계단을 오르는 방법은 2가지가 존재한다. 1 step…

Read More

How to correctly manage different versions in Ubuntu

March 13, 2018

For many programs, it's necessary to install multi versions such as gcc4.8, gcc6, and gcc7 because it's possible that some projects need a…

Read More

Check if it's a BST

March 12, 2018

Is This a Binary Search Tree? This problem can be solved in HackerRank. Condition No duplicate in the tree. Solution First, we know the…

Read More

Find a lonely integer

March 11, 2018

Problem description The problem is the following Given an array of integers, find and print the unique element. For example, [1] should…

Read More

© 2024 Mo Kweon. All rights reserved.