腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
首页
学习
活动
专区
工具
TVP
最新优惠活动
返回腾讯云官网
算法修养
专栏成员
举报
674
文章
399943
阅读量
49
订阅数
订阅专栏
申请加入专栏
全部文章(674)
编程算法(343)
数据结构(231)
其他(97)
c++(27)
数组(17)
二叉树(16)
动态规划(14)
人工智能(13)
java(12)
ios(11)
dfs(11)
.net(9)
dp(8)
github(7)
字符串(7)
https(6)
binary(6)
遍历(6)
递归(6)
排序(6)
效率(6)
git(5)
lucene/solr(5)
容器镜像服务(5)
http(4)
容器(4)
add(4)
hash(4)
integer(4)
二进制(4)
php(3)
asp.net(3)
ajax(3)
analyzer(3)
nginx(3)
缓存(3)
digits(3)
height(3)
int(3)
ode(3)
搜索(3)
对象存储(2)
python(2)
javascript(2)
数据库(2)
搜索引擎(2)
开源(2)
分布式(2)
正则表达式(2)
class(2)
double(2)
excel(2)
for循环(2)
matrix(2)
numbers(2)
public(2)
size(2)
string(2)
sum(2)
tree(2)
博客(2)
数据(2)
算法(2)
指针(2)
lua(1)
regex(1)
node.js(1)
xml(1)
css(1)
json(1)
云数据库 SQL Server(1)
memcached(1)
sql(1)
flask(1)
ide(1)
api(1)
struts(1)
tomcat(1)
全文检索(1)
linux(1)
ubuntu(1)
apache(1)
压力测试(1)
网络安全(1)
ssh(1)
openstack(1)
asp(1)
单元测试(1)
数据处理(1)
windows(1)
nat(1)
postcss(1)
area(1)
bit(1)
break(1)
count(1)
data(1)
dictionary(1)
element(1)
expression(1)
factorial(1)
frequency(1)
grid(1)
hashtable(1)
input(1)
insert(1)
iterator(1)
limit(1)
list(1)
map(1)
next(1)
nlog(1)
nodes(1)
output(1)
pascal(1)
sudoku(1)
summary(1)
target(1)
void(1)
word(1)
变量(1)
编码(1)
继承(1)
基础(1)
集合(1)
接口(1)
链表(1)
统计(1)
序列化(1)
压缩(1)
原理(1)
重构(1)
搜索文章
搜索
搜索
关闭
LeetCode 82. Remove Duplicates from Sorted List II
c++
题目 c++ /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode* deleteDuplicates(ListNode* head) {
ShenduCC
2019-11-14
248
0
LeetCode 83. Remove Duplicates from Sorted List
c++
题目 c++ /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode* deleteDuplicates(ListNode* head) {
ShenduCC
2019-11-14
264
0
LeetCode 61. Rotate List
c++
题目 c++ /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode* rotateRight(ListNode* head, int k) { if(he
ShenduCC
2019-09-16
503
0
LeetCode 60. Permutation Sequence
c++
康拓展开其实就是表示一个连续序列,其实也不用连续,给定一个序列,可以很快速的按照字典序,列出所有序列。给出特定序列,快速告诉你它是按照字典序排序是第几个,给出排名,快速输出序列
ShenduCC
2019-09-10
308
0
使用位运算实现int32位 整数的加减乘除
c++
二进制
我觉得异或操作和与操作完全就是实现加法的。 异或就是相同位相加最后留下的结果,而与就是相同位相加是否进1的结果。
ShenduCC
2019-08-26
1.3K
0
LeetCode 43 Multiply Strings
c++
字符串
题目 用字符串模拟两数相乘。 在纸上模拟一下小学时学的算术乘法,就知道怎么做了。 c++ class Solution { public: int ans[10005]; string multiply(string num1, string num2) { if(num1=="0"||num2=="0") return "0"; int pos=0; int start=0;
ShenduCC
2019-08-20
538
0
LeetCode 42. Trapping Rain Water
c++
题目 1A c++ O(n^2) class Solution { public: int trap(vector<int>& height) { int ans=0; for(int i=1;i<height.size();i++) { if(height[i]>height[i-1]) { int pos=0;
ShenduCC
2019-08-16
387
0
LeetCode 38.Count and Say
c++
class
int
public
string
c++ ``` class Solution { public: string a[31]; string countAndSay(int n) {
ShenduCC
2019-08-06
327
0
LeetCode 37. Sudoku Solver
c++
dfs
题目 c++ DFS ,代码写的又臭又长,Faster than 85.33% class Solution { public: set<int> a[10][10]; set<pair<int,int>> e; int b[10][10]; int c[10][10]; int judge(int i,int j,int x) { for(int k=0;k<9;k++) { if(k==j) cont
ShenduCC
2019-08-06
296
0
LeetCode 33 Search in Rotated Sorted Array
c++
题目 c++ 二分 class Solution { public: int search(vector<int>& nums, int target) { if(nums.size()==0) return -1; int start=0; int end = nums.size()-1; int ans=-1; while(start<end)
ShenduCC
2019-07-24
371
0
LeetCode 31. Next Permutation
c++
题目 c++ class Solution { public: void nextPermutation(vector<int>& nums) { int tag=0; int z=-1; for(int i=nums.size()-1;i>=0;i--) { if(i!=0&&nums[i]>nums[i-1]) { z=i-1;
ShenduCC
2019-07-18
293
0
LeetCode 27 Remove Element
c++
题目 c++ class Solution { public: int removeElement(vector<int>& nums, int val) { int ans = nums.size(); int i=0; while(i<ans) { if(nums[i]==val) { int j=i+1;
ShenduCC
2019-07-15
545
0
LeetCode 19. Remove Nth Node From End of List
c++
题目 c++ /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode* removeNthFromEnd(ListNode* head, int n) {
ShenduCC
2019-07-01
299
0
LeetCode 14 Longest Common Prefix
c++
题目 c++ class Solution { public: string longestCommonPrefix(vector<string>& strs) { if(strs.size()==0) return ""; int i=0; string ans=""; while(true) { if(i==strs[0].length())
ShenduCC
2019-06-24
566
0
LeetCode 13 Roman to Integer
c++
题目 c++ class Solution { public: int v[7]={1,5,10,50,100,500,1000}; char s2[7]={'I','V','X','L','C','D','M'}; map<char,int>m; int romanToInt(string s) { int j=0; for(int i=0;i<7;i++) { m[s2[i]]=v[i];
ShenduCC
2019-06-24
237
0
LeetCode 9 Palindrome Number
c++
题目 c++ class Solution { public: int a[100005]; bool isPalindrome(int x) { if(x<0) return false; int pos=0; while(x) { a[pos++]=x%10; x/=10; }
ShenduCC
2019-06-18
327
0
LeetCode 8 String to Integer (atoi)
c++
题目 c++ 多注意注意 class Solution { public: int myAtoi(string str) { int len = str.length(); int tag=0; int tag2=0; char tag3='x'; string num=""; for(int i=0;i<len;i++) { if(str[i]!
ShenduCC
2019-06-16
293
0
LeetCode 7 Reverse Integer
c++
题目 c++ class Solution { public: int reverse(int x) { long long int ans=0; int tag=0; while(x) { long long int y =x%10; x/=10; if(y==0&&tag==0) continue;
ShenduCC
2019-06-05
370
0
LeetCode 3 Longest Substring Without Repeating Characters
c++
题目 c++ class Solution { public: map<char,int> m; int a[100005]; int lengthOfLongestSubstring(string s) { int len = s.length(); if(len==0) return 0; a[0]=1; m[s[0]]=1; int mm=1;
ShenduCC
2019-06-03
250
0
LeetCode 152 Maximum Product Subarray
c++
动态规划
数组
题目 思路 维护两个数组,一个是a[i] 表示以i为结尾的子序列乘积的最大值 一个是b[i] 表示以i为结尾的子序列乘积的最小值 然后就是动态规划的思想。 c++ class Solution { public: int s[1000005]; int a[1000005]; int b[1000005]; int maxProduct(vector<int>& nums) { a[0]=nums[0]; b[0]=nums[0]
ShenduCC
2019-05-15
296
0
点击加载更多
社区活动
【纪录片】中国数据库前世今生
穿越半个世纪,探寻中国数据库50年的发展历程
立即查看
Python精品学习库
代码在线跑,知识轻松学
立即查看
博客搬家 | 分享价值百万资源包
自行/邀约他人一键搬运博客,速成社区影响力并领取好礼
立即体验
技术创作特训营·精选知识专栏
往期视频·千货材料·成员作品 最新动态
立即查看
领券
问题归档
专栏文章
快讯文章归档
关键词归档
开发者手册归档
开发者手册 Section 归档