柯森锎
码龄9年
关注
提问 私信
  • 博客:69,021
    69,021
    总访问量
  • 97
    原创
  • 364,563
    排名
  • 55
    粉丝
  • 0
    铁粉

个人简介:92年的小学生

IP属地以运营商信息为准,境内显示到省(区、市),境外显示到国家(地区)
IP 属地:上海市
  • 加入CSDN时间: 2016-06-14
博客简介:

柯森锎的博客

博客描述:
学习的技术博客
查看详细资料
个人成就
  • 获得18次点赞
  • 内容获得14次评论
  • 获得12次收藏
创作历程
  • 1篇
    2018年
  • 96篇
    2016年
成就勋章
TA的专栏
  • PAT乙级
    56篇
  • PAT甲级
    19篇
  • LeetCode
    20篇
  • 数据结构与算法
    2篇
  • 图
    2篇
  • 树
    2篇
  • 并查集
    1篇
  • 链表
    3篇
  • 数学
    1篇
  • String
    9篇
  • HashTable
    1篇
  • TwoPointer
    6篇
  • 分治法
    1篇
  • 二分查找
    1篇
  • 数组
    4篇
  • Math
    6篇
  • C++
    2篇
  • 动态规划
    4篇
  • 回溯法
    2篇
  • Easy
    2篇
  • Medium
    2篇
  • Qt图形界面
    1篇
  • 最近
  • 文章
  • 代码仓
  • 资源
  • 问答
  • 帖子
  • 视频
  • 课程
  • 关注/订阅/互动
  • 收藏
搜TA的内容
搜索 取消

Qt图形界面编程入门(1)——习题3.2 信号和槽

开始学习Qt的图形界面编程,买了清华大学出版社的《Qt图形界面编程入门》学习,做第三章的习题2。题目编写程序,一个对话框内有一个标签和一个按钮,标签对象初始显示0,每次单击按钮,标签显示的数字就加1。思路不需要传递内容,那么按钮信号用clicked,创建一个自定义的QLabel的派生类,添加一个AddNum函数,无参数。代码新建一个无UI向导的Dialog应用。头...
原创
发布博客 2018.07.13 ·
4256 阅读 ·
4 点赞 ·
1 评论 ·
10 收藏

LeetCode 19. Remove Nth Node From End of List

题目描述Given a linked list, remove the nth node from the end of list and return its head.For example, Given linked list: 1->2->3->4->5, and n = 2. After removing the second node from the end, the linked
原创
发布博客 2016.11.24 ·
477 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

LeetCode 18. 4Sum

题目描述Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of target.Note: The solution se
原创
发布博客 2016.11.23 ·
466 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

LeetCode 17. Letter Combinations of a Phone Number

题目描述Given a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telephone buttons) is given below.Input:Digit string "2
原创
发布博客 2016.11.17 ·
415 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

LeetCode 16. 3Sum Closest (Two-Pointer)

题目描述Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would have exac
原创
发布博客 2016.10.23 ·
385 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

LeetCode 15. 3Sum (Medium)

题目描述Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.题目解析最直接的是三重循环; 由于要求去掉重复的答案,所以要先对nums排序;
原创
发布博客 2016.10.23 ·
503 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

LeetCode 14. Longest Common Prefix (easy)

题目描述Write a function to find the longest common prefix string amongst an array of strings.代码class Solution {public: string longestCommonPrefix(vector<string>& strs) { int n_str=strs.size()
原创
发布博客 2016.10.23 ·
323 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

LeetCode 13. Roman to Integer

题目描述Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999.代码class Solution {public: int romanToInt(string s) { map<char,int>dig;
原创
发布博客 2016.10.22 ·
359 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

LeetCode 12. Integer to Roman

题目描述Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999.题目解析将阿拉伯数字转换为罗马数字。 罗马数字表示方法: I-1,X-10,C-100,M-1000; V-5,L-50,D-500; 1. 相同的数字连写、所表示的数等
原创
发布博客 2016.10.22 ·
305 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

LeetCode 11. Container With Most Water(Two-Pointer 详解)

题目描述Given n non-negative integers a1, a2, …, an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two
原创
发布博客 2016.10.11 ·
435 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

LeetCode 44. Wildcard Matching

题目描述Implement wildcard pattern matching with support for ‘?’ and ‘*’.‘?’ Matches any single character. ‘*’ Matches any sequence of characters (including the empty sequence).The matching should cover t
原创
发布博客 2016.10.11 ·
244 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

LeetCode 32. Longest Valid Parentheses(hard)

题目描述Given a string containing just the characters ‘(’ and ‘)’, find the length of the longest valid (well-formed) parentheses substring.For “(()”, the longest valid parentheses substring is “()”, which
原创
发布博客 2016.09.29 ·
348 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

动态规划解析

参考《算法导论》动态规划章节。 判断一个问题能否用动态规划解决,要求问题满足两个条件: 1)存在最优子结构,即一个问题可以通过n(n>=1)个选择划分成n或n+1个同类子问题+选择代价; 2)存在重叠子问题,不同的问题会重复调用同一个子问题;动态规划解决问题的步骤: 1)刻画一个最优解的结构特征,即寻找一个最优子结构; 2)一个递归求解方案; 3)计算最优解的值,两种方法
原创
发布博客 2016.09.26 ·
464 阅读 ·
0 点赞 ·
0 评论 ·
1 收藏

LeetCode 10. Regular Expression Matching(hard)

题目描述Implement regular expression matching with support for ‘.’ and ‘*’.‘.’ Matches any single character. ‘*’ Matches zero or more of the preceding element.The matching should cover the entire input st
原创
发布博客 2016.09.25 ·
369 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

LeetCode 9. Palindrome Number

题目描述Determine whether an integer is a palindrome. Do this without extra space.题目解析注意负数不是回文数;代码class Solution {public: bool isPalindrome(int x) { if(x==0) { return true;
原创
发布博客 2016.09.23 ·
304 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

LeetCode 8. String to Integer (atoi)

题目描述Implement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input cas
原创
发布博客 2016.09.23 ·
346 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

LeetCode 7. Reverse Integer

题目描述Reverse digits of an integer.Example1: x = 123, return 321 Example2: x = -123, return -321click to show spoilers.Have you thought about this? Here are some good questions to ask before coding. Bo
原创
发布博客 2016.09.23 ·
215 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

LeetCode 5. Longest Palindromic Substring

题目描述Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic substring.题目解析找出最大的回文子串; 开始的想法是遍
原创
发布博客 2016.09.22 ·
225 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

LeetCode 4. Median of Two Sorted Arrays

题目描述 There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)). Example 1:
原创
发布博客 2016.09.21 ·
322 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

LeetCode 3. Longest Substring Without Repeating Characters

题目描述Given a string, find the length of the longest substring without repeating characters.Examples:Given “abcabcbb”, the answer is “abc”, which the length is 3.Given “bbbbb”, the answer is “b”, with th
原创
发布博客 2016.09.21 ·
279 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏
加载更多