![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
LeetCode
zita_xxx
大二小白,努力成长中
展开
-
Add Two Numbers
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return i原创 2017-04-07 19:35:59 · 178 阅读 · 0 评论 -
reverse integer
Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321click to show spoilers.Note:The input is assumed to be a 32-bit signed integer. Your function原创 2017-04-13 11:10:12 · 123 阅读 · 0 评论 -
LRU cache
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and put.get(key) - Get the value (will always be positive) of the key if the原创 2017-05-05 16:08:36 · 185 阅读 · 0 评论 -
557. Reverse Words in a String III
听cgl的话,先从简单的刷起。Given a string, you need to reverse the order of characters in each word within a sentence while still preserving whitespace and initial word order.Example 1:Input: "Let's原创 2017-05-06 10:50:42 · 200 阅读 · 0 评论 -
566. Reshape the Matrix
class Solution {public: vector> matrixReshape(vector>& nums, int r, int c) { int row = nums.size(); int col = nums[0].size(); if (r*c != row*col) return nums; vector> ret(r); for (int i原创 2017-05-06 11:58:28 · 175 阅读 · 0 评论