freeCookie


freeCookie_🍪

LC466. Count The Repetitions

A difficult DP problem

LC466. Count The Repetitions Define S = [s,n] as the string S which consists of n connected strings s. For example, ["abc", 3] =”abcabcabc”. On t...

Algorithm Part II Week1

Undirected Grapth & Directed Graph

Algorithm Part II Week1 这个算法课算是Coursera上我最爱的网课了,内容务实API又做的很好,assignment的自动评分反馈系统膜拜。就是配他家的作业环境还搞了一会… Algorithm Part I 前前后后看了两遍算是我的入门算法JAVA课,Part II...

Leetcode - Paint House

LC256, LC265

LC256. Paint House There are a row of n houses, each house can be painted with one of the three colors: red, blue or green. The cost of painting e...

LC410. Split Array Largest Sum

LC410. Split Array Largest Sum Given an array which consists of non-negative integers and an integer m, you can split the array into m non-empty c...

LC403. Frog Jump

LC403. Frog Jump A frog is crossing a river. The river is divided into x units and at each unit there may or may not exist a stone. The frog can j...

LC97. Interleaving String

Find whether s3 is formed by the interleaving of s1 and s2.

LC97. Interleaving String Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2. For example, Given: s1 = "aabcc", s2 = "d...

LC87. Scramble String

LC87. Scramble String Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively. Below i...

LC464. Can I Win

LC464. Can I Win In the “100 game,” two players take turns adding, to a running total, any integer from 1..10. The player who first causes the run...