随笔分类 -  LeetCode

摘要:Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others are n 阅读全文
posted @ 2019-03-28 16:17 czhao4 阅读(85) 评论(0) 推荐(0) 编辑
摘要:Given an array A of strings made only from lowercase letters, return a list of all characters that show up in all strings within the list (including d 阅读全文
posted @ 2019-03-08 11:18 czhao4 阅读(117) 评论(0) 推荐(0) 编辑
摘要:Given a string S that only contains "I" (increase) or "D" (decrease), let N = S.length. Return any permutation A of [0, 1, ..., N] such that for all i 阅读全文
posted @ 2019-03-07 09:08 czhao4 阅读(79) 评论(0) 推荐(0) 编辑
摘要:Given an array A of non-negative integers, return an array consisting of all the even elements of A, followed by all the odd elements of A. You may re 阅读全文
posted @ 2019-03-06 09:22 czhao4 阅读(97) 评论(0) 推荐(0) 编辑
摘要:Given an array of integers A sorted in non-decreasing order, return an array of the squares of each number, also in sorted non-decreasing order. Examp 阅读全文
posted @ 2019-03-05 09:16 czhao4 阅读(87) 评论(0) 推荐(0) 编辑
摘要:In a array A of size 2N, there are N+1 unique elements, and exactly one of these elements is repeated N times. Return the element repeated N times. Ex 阅读全文
posted @ 2019-03-04 09:03 czhao4 阅读(80) 评论(0) 推荐(0) 编辑
摘要:Every email consists of a local name and a domain name, separated by the @ sign. For example, in alice@leetcode.com, alice is the local name, and leet 阅读全文
posted @ 2019-02-28 17:12 czhao4 阅读(108) 评论(0) 推荐(0) 编辑