链表考察点 链表题目一个考察点就是如何处理复杂的指针. 既然是复杂指针, 那么很大的一个考点就是如何处理指针. dummy node 这个是将很多 corner case 处理掉的一个神器 好的命名 dummy_node…
分类:LeetCode
[LeetCode] Generate Parentheses 生成括号, Longest Valid Parentheses 最长有效括号
Given n pairs of parentheses, write a function to generate all combinations of well-formed pa…
[LeetCode] Path Sum II 二叉树路径之和之二
Given a binary tree and a sum, find all root-to-leaf paths where each path’s sum equals the given…
LeetCode 221 Maximal Square
题目描述 Given a 2D binary matrix filled with 0’s and 1’s, find the largest square containing all 1’s and return i…
LeetCode 208 Implement Trie (Prefix Tree)
题目描述 Implement a trie with insert, search, and startsWith methods. Note: You may assume that all inputs are co…
【leetcode】87. Scramble String 字符串树形颠倒匹配
1. 题目 Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings r…
2016.9.11 Leetcode 371. Sum of Two Integers
Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -. Example: Given…
[LeetCode][String] 186. Reverse Words in a String II
Problem More LeetCode Discussions Given an input string, reverse the string word by word. A word is defined as…
[LintCode][System Design] Mini Cassandra
Problem More on LeetCode Discussion Cassandra is a NoSQL storage. The structure has two-level keys. Level 1: r…
Swift LeetCode 系列之 7: Reverse Integer
title: ‘Swift LeetCode 系列之 7: Reverse Integer’date: 2017-07-21 10:31:48tags: 本篇文章我是LeetCode 系列之第一篇…
36. 有效的数独
一、题目原型: 判断一个 9×9 的数独是否有效。只需要根据以下规则,验证已经填入的数字是否有效即可。 数字 1-9 在每一行只能出现一次。 数字 1-9 在每一列只能出现一次。 数字 1-9 在每一个以粗实线…
647. Palindromic Substrings
Medium Given a string, your task is to count how many palindromic substrings in this string. The substrings wi…