首页
Python
Java
前端
数据库
Linux
Chatgpt专题
开发者工具箱
leetcode65专题
leetCode65. 有效数字
leetCode65. 有效数字 题目思路 代码 class Solution {public:bool isNumber(string s) {int l = 0, r = s.size() - 1;// 1.忽略前后的空格while(l <= r && s[l] == ' ') l++;while(l <= r && s[r] == ' ') r--;if(l > r) retur
阅读更多...
[LeetCode65]Pascal's Triangle II
Given an index k, return the kth row of the Pascal's triangle. For example, given k = 3, Return [1,3,3,1]. Note: Could you optimize your algorithm to use only O(k) extra space? Analysis: 滚动数组
阅读更多...