摘要:
题目: Given a non-empty string s, you may delete at most one character. Judge whether you can make it a palindrome. 给定非空字符串s,您最多可以删除一个字符。 判断你是否可以成为回文。 E 阅读全文
摘要:
题目: We define the Perfect Number is a positive integer that is equal to the sum of all its positive divisors except itself. 我们定义Perfect Number是一个正整数,它 阅读全文
摘要:
题目: Given a binary tree, find the length of the longest path where each node in the path has the same value. This path may or may not pass through the 阅读全文
摘要:
题目: Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. 设计一个支持push,pop,top和在恒定时间内检索最小元素的堆栈。 push(x) -- P 阅读全文
摘要:
题目: Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. 给定两个排序的整数数组nums1和nums2,将nums2合并为nums1作为一个排序的数组。 Note: 阅读全文
摘要:
题目: A quadtree is a tree data in which each internal node has exactly four children: topLeft, topRight, bottomLeft and bottomRight. Quad trees are oft 阅读全文
摘要:
题目: Given a sorted (in ascending order) integer array nums of n elements and a target value, write a function to search target in nums. If target exis 阅读全文
摘要:
题目: Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j] and 阅读全文
摘要:
题目: Given a pattern and a string str, find if str follows the same pattern. 给定一个模式和一个字符串str,找到str是否遵循相同的模式。 Here follow means a full match, such that 阅读全文
摘要:
题目: Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive. 给定整数数组nums,找到索引i和j(i≤j)之间的元素之和,包括端点。 Example 阅读全文