Add leetcode code for first three problems