
Leetcode
文章平均质量分 62
dzkqstranger
这个作者很懒,什么都没留下…
展开
-
LeetCode 728. Self Dividing Numbers (Java)
解决方案: class Solution { public List<Integer> selfDividingNumbers(int left, int right) { List<Integer> result = new ArrayList() ; for (int i = left; i <= r...原创 2017-12-01 12:09:41 · 472 阅读 · 0 评论 -
Leetcode 617. Merge Two Binary Trees.(Java)
问题描述 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 not. You need to merge them into a new binar...原创 2018-03-30 23:55:35 · 396 阅读 · 0 评论 -
Leetcode 561. Array Partition I (Java)
问题描述 Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2), …, (an, bn) which makes sum of min(ai, bi) for all i from 1 to n as large as ...原创 2018-03-31 00:09:34 · 449 阅读 · 0 评论 -
Leetcode 766. Toeplitz Matrix (Java)
问题描述 A matrix is Toeplitz if every diagonal from top-left to bottom-right has the same element. Now given an M x N matrix, return True if and only if the matrix is Toeplitz. Example 1: Input:...原创 2018-04-01 23:46:43 · 456 阅读 · 0 评论 -
Leetcode 811. Subdomain Visit Count(Java)
问题描述 A website domain like “discuss.leetcode.com” consists of various subdomains. At the top level, we have “com”, at the next level, we have “leetcode.com”, and at the lowest level, “discuss.leetcod...原创 2018-04-03 21:39:12 · 723 阅读 · 0 评论 -
Leetcode 804.Unique Morse Code Words (Java)
问题描述:International Morse Code defines a standard encoding where each letter is mapped to a series of dots and dashes, as follows: "a"maps to ".-", "b" maps to "-...", "c" maps to "-.-.", and so on原创 2018-03-28 20:35:16 · 718 阅读 · 0 评论 -
Leetcode 771. Jewels and Stones (Java)
问题描述 You’re given strings J representing the types of stones that are jewels, and S representing the stones you have. Each character in S is a type of stone you have. You want to know how many of t...原创 2018-03-28 21:26:37 · 477 阅读 · 0 评论 -
Leetcode 806. Number of Lines To Write String (Java)
问题描述 We are to write the letters of a given string S, from left to right into lines. Each line has maximum width 100 units, and if writing a letter would cause the width of the line to exceed 100 uni...原创 2018-03-28 23:03:50 · 376 阅读 · 0 评论