
程序
文章平均质量分 78
Rrui_739
这个作者很懒,什么都没留下…
展开
-
Leetcode算法刷题笔记(四)
151.Reverse Words in a Stringclass Solution {public: void reverseWords(string &s) { if(s.empty()) return ; string k,p; for(i...原创 2018-10-22 15:32:16 · 673 阅读 · 0 评论 -
Leetcode算法刷题笔记(五)
注:本页有大量的锁定题,由于本人非常穷,所以本页的题非常少。217.Contains Duplicateclass Solution {public: bool containsDuplicate(vector<int>& nums) { map<int,int>a; ...原创 2018-10-30 13:42:00 · 337 阅读 · 0 评论 -
Rrui的Leetcode算法刷题笔记(六)
注:本页有大量的锁定题,由于本人非常穷,所以本页的题非常少。268. Missing Numberclass Solution {public: int missingNumber(vector<int>& nums) { int k=INT_MAX; for(int i=0;i<nums.size()...原创 2018-11-06 13:20:34 · 402 阅读 · 0 评论 -
Rrui的Leetcode算法刷题笔记(八)
368. Largest Divisible Subset 注:中等题,不解释,浪费时间。faster than 100.00%。 417. Pacific Atlantic Water Flow 注:中等题,不解释,浪费时间。faster than 100.00%。 Rrui的Leetcode算法刷题笔记(九)链接如下:https://blog.c...原创 2018-11-15 21:59:26 · 414 阅读 · 0 评论 -
Rrui的Leetcode算法刷题笔记(七)
注:本页有一定量的锁定题,由于本人非常穷,所以本页的题较少。318. Maximum Product of Word Lengths 注:简单题,不解释,浪费时间。faster than 100.00%。 326. Power of Threeclass Solution {public: bool isPowerOfThree(int n) { ...原创 2018-11-14 21:37:56 · 326 阅读 · 0 评论 -
Rrui的Leetcode刷题笔记(十)
482.License Key Formattingclass Solution {public: string licenseKeyFormatting(string S, int K) { string s,p="-"; int sum=0; for(int...原创 2018-11-24 13:35:19 · 288 阅读 · 0 评论 -
Rrui的Leetcode算法刷题笔记(九)
427. Construct Quad Tree/*// Definition for a QuadTree node.class Node {public: bool val; bool isLeaf; Node* topLeft; Node* topRight; Node* bottomLeft; Node* bottom...原创 2018-11-27 16:55:41 · 266 阅读 · 0 评论 -
剑指Offer算法刷题解答 --基于牛客网C++编译器
注:首先感谢牛客网提供了这样一个平台,让我在看书刷题之余能够刷到书上的题,希望牛客网越办越好,不忘初心~黑色表示难度较低不会再写,粉色表示打算三刷,红色表示看答案才会今后必刷。1、赋值运算符函数注:略。2、实现Singleton模式注:略。3、数组中重复的数字题目描述:在一个长度为n的数组里的所有数字都在0到n-1的范围内。 数组中某些数字是重复的...原创 2019-07-15 21:11:10 · 768 阅读 · 0 评论 -
Leetcode经典编程题解答 --基于牛客网C++编译器
熟悉一下牛客网的编译器,面试笔试肯定用的到~不间断更新中。。1、minimum-depth-of-binary-treeGiven a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node dow...原创 2019-07-22 21:19:25 · 815 阅读 · 0 评论