LeetCode
文章平均质量分 78
iouiwc
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
LeetCode::Rotate Array C语言
题目 Rotate an array of n elements to the right by k steps. For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,4]. Note: Try to come up as many solutions a原创 2015-03-08 01:18:25 · 784 阅读 · 1 评论 -
LeetCode::Zigzag Conversion C语言
题目 The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility) P A H N A P L原创 2015-03-07 22:36:11 · 1937 阅读 · 0 评论 -
LeetCode::Reverse Integer C语言
题目 Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 click to show spoilers. Have you thought about this? Here are some good questions to ask before c原创 2015-03-07 21:00:20 · 2699 阅读 · 1 评论 -
LeetCode::Two Sum C语言
题目 Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two numbers such that they add up to the target,原创 2015-03-07 15:39:19 · 10080 阅读 · 2 评论 -
LeetCode::Binary Search Tree Iterator
题目 Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST. Calling next() will return the next smallest number in the BST. Note: next原创 2015-03-12 17:54:26 · 533 阅读 · 0 评论 -
LeetCode::Merge Sorted Array C++语言
问题 Given two sorted integer arrays A and B, merge B into A as one sorted array. Note: You may assume that A has enough space (size that is greater or equal to m + n) to hold additional element原创 2015-03-12 15:39:27 · 509 阅读 · 0 评论 -
LeetCode[85]::Maximal Rectangle C++
Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area. class Solution { public: int maximalRectangle(vector>& matrix) {原创 2015-08-22 20:45:14 · 686 阅读 · 0 评论 -
LeetCode[91]::Decode Ways C++
A message containing letters from A-Z is being encoded to numbers using the following mapping: 'A' -> 1 'B' -> 2 ... 'Z' -> 26 Given an encoded message containing digits, determine the total number原创 2015-08-22 22:47:21 · 991 阅读 · 0 评论 -
LeetCode[97]::Interleaving String C++
Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2. For example, Given: s1 = "aabcc", s2 = "dbbca", When s3 = "aadbbcbcac", return true. When s3 = "aadbbbaccc", return原创 2015-08-22 23:40:00 · 944 阅读 · 0 评论
分享