文章浏览阅读119次。2020-3-24Every boring hour in life is unique. 在生命中,再无聊的时光也是限量版。题目:给定一个链表,删除链表的倒数第 n 个节点,并且返回链表的头结点。示例:给定一个链表: 1->2->3->4->5, 和 n = 2.当删......
题目:We are playing the Guess Game. The game is as follows:I pick a number from 1 to n. You have to guess which number I picked.Every time you guess wrong, I will tell you whether the number I picked is higher or lower than your guess.You call a pre-defi_guessnumber(self,n:int)...
文章浏览阅读420次。滑动窗口有很多资料视频可以学习,主要写一下实现步骤,几乎全注释#include <string>class Solution {public: int lengthOfLongestSubstring(string s) {//滑动窗口解法 int len; len = s.size();//长度 int ans=0;//初始化结果......
文章浏览阅读424次。滑动窗口有很多资料视频可以学习,主要写一下实现步骤,几乎全注释#include <string>class Solution {public: int lengthOfLongestSubstring(string s) {//滑动窗口解法 int len; len = s.size();//长度 int ans=0;//初始化结果......