原创 Word Pattern -- Leetcode

Given a pattern and a string str, find if str follows the same pattern. Here follow means a full match, such that t

原创 Game of Life -- leetcode

According to the Wikipedia's article: "The Game of Life, also known simply as Life, is a cellular automaton devised

原创 Additive Number -- leetcode

Additive number is a string whose digits can form additive sequence. A valid additive sequence should contain at lea

原创 Range Sum Query 2D -- leetcode

Given a 2D matrix matrix, find the sum of the elements inside the rectangle defined by its upper left corner (row1, c

原创 Peeking Iterator -- leetcode

Given an Iterator class interface with methods: next() and hasNext(), design and implement a PeekingIterator that su

原创 Serialize and Deserialize Binary Tree -- leetcode

Serialization is the process of converting a data structure or object into a sequence of bits so that it can be store

原创 正則表達式30分鐘入門教程

目錄 跳過目錄 本文目標如何使用本教程正則表達式到 底是什麼東西?入門測試正則表達式元字符字符轉義重複字符類分枝條件反義分組後向引用零寬斷言負 向零寬斷言註釋貪婪與懶惰處理選項平衡組/遞 歸匹配還 有些什麼東西沒提到聯繫作者最 後,來點

原创 Move Zeroes -- leetcode

Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the n