上一页 1 2 3 4 5 6 7 ··· 11 下一页

LeetCode 242 Valid Anagram 解题报告

摘要: 题目要求 Given two strings s and t , write a function to determine if t is an anagram of s. 题目分析及思路 给出两个字符串s和t,要求判断t是否是s的一个anagram,即由相同的字母且不同的字母顺序组成。可以使用c 阅读全文
posted @ 2019-04-14 09:21 锋上磬音 阅读(78) 评论(0) 推荐(0) 编辑

LeetCode 13 Roman to Integer 解题报告

摘要: 题目要求 Roman numerals are represented by seven different symbols: I, V, X, L, C, Dand M. For example, two is written as II in Roman numeral, just two on 阅读全文
posted @ 2019-04-13 09:31 锋上磬音 阅读(107) 评论(0) 推荐(0) 编辑

LeetCode 169 Majority Element 解题报告

摘要: 题目要求 Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times. You may assume tha 阅读全文
posted @ 2019-04-12 09:25 锋上磬音 阅读(68) 评论(0) 推荐(0) 编辑

LeetCode 705 Design HashSet 解题报告

摘要: 题目要求 Design a HashSet without using any built-in hash table libraries. To be specific, your design should include these functions: add(value): Insert 阅读全文
posted @ 2019-04-11 09:49 锋上磬音 阅读(98) 评论(0) 推荐(0) 编辑

LeetCode 653 Two Sum IV - Input is a BST 解题报告

摘要: 题目要求 Given a Binary Search Tree and a target number, return true if there exist two elements in the BST such that their sum is equal to the given targ 阅读全文
posted @ 2019-04-10 09:47 锋上磬音 阅读(75) 评论(0) 推荐(0) 编辑

LeetCode 520 Detect Capital 解题报告

摘要: 题目要求 Given a word, you need to judge whether the usage of capitals in it is right or not. We define the usage of capitals in a word to be right when o 阅读全文
posted @ 2019-04-09 14:44 锋上磬音 阅读(107) 评论(0) 推荐(0) 编辑

LeetCode 993 Cousins in Binary Tree 解题报告

摘要: 题目要求 In a binary tree, the root node is at depth 0, and children of each depth k node are at depth k+1. Two nodes of a binary tree are cousins if they 阅读全文
posted @ 2019-04-08 11:23 锋上磬音 阅读(415) 评论(0) 推荐(0) 编辑

LeetCode 237 Delete Node in a Linked List 解题报告

摘要: 题目要求 Write a function to delete a node (except the tail) in a singly linked list, given only access to that node. 题目分析及思路 要求写一个函数,删除一个单链表中的一个结点(除了最后一个 阅读全文
posted @ 2019-04-06 10:04 锋上磬音 阅读(85) 评论(0) 推荐(0) 编辑

LeetCode 389 Find the Difference 解题报告

摘要: 题目要求 Given two strings s and t which consist of only lowercase letters. String t is generated by random shuffling string s and then add one more lette 阅读全文
posted @ 2019-04-05 09:37 锋上磬音 阅读(82) 评论(0) 推荐(0) 编辑

LeetCode 696 Count Binary Substrings 解题报告

摘要: 题目要求 Give a string s, count the number of non-empty (contiguous) substrings that have the same number of 0's and 1's, and all the 0's and all the 1's 阅读全文
posted @ 2019-04-04 10:26 锋上磬音 阅读(76) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 11 下一页