缄默斯
缄默斯
全部文章
刷题
linux(9)
nodejs(4)
日记(8)
框架学习(7)
算法与数据结构(19)
项目(3)
归档
标签
去牛客网
登录
/
注册
缄默斯的博客
学无止境
全部文章
/ 刷题
(共22篇)
leetcode17(letter-combinations-of-a-phone-number)
class Solution { public: vector<string> letterCombinations(string digits) { if(digits=="") return vector<string>(); ...
2020-01-31
0
523
PAT-A1018
1018 Public Bike Management (30分) There is a public bike service in Hangzhou City which provides great convenience to the tourists from all over the ...
2020-01-10
0
440
PAT-1003-Emergency
As an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scattered cities connected by some ro...
2020-01-09
0
456
HD1004(Let the Balloon Rise)
Problem Description Contest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges’ favorite time is gues...
2019-10-31
0
411
HD1003-MaxSum
Problem Description Given a sequence a[1],a[2],a[3]…a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), th...
2019-10-30
0
387
剑指offer(跳台阶)
题目描述 一只青蛙一次可以跳上1级台阶,也可以跳上2级。求该青蛙跳上一个n级的台阶总共有多少种跳法(先后次序不同算不同的结果)。 class Solution { public: int jumpFloor(int number) { //尾递归 if (numbe...
2019-10-30
0
501
leetcode349两个数组的交集
给定两个数组,编写一个函数来计算它们的交集。 示例 1: 输入: nums1 = [1,2,2,1], nums2 = [2,2] 输出: [2] 示例 2: 输入: nums1 = [4,9,5], nums2 = [9,4,9,8,4] 输出: [9,4] 说明: 输出结果中的每个元...
2019-10-22
0
395
剑指offer(替换空格)
请实现一个函数,将一个字符串中的每个空格替换成“%20”。例如,当字符串为We Are Happy.则经过替换之后的字符串为We%20Are%20Happy。 void replaceSpace(char *str, int length) { //记录空格出现的个数,申请一个等长的数组,...
2019-10-21
0
412
leetcode_32删除排序链表重复元素
给定一个排序链表,删除所有含有重复数字的节点,只保留原始链表中 没有重复出现 的数字。 示例 1: 输入: 1->2->3->3->4->4->5 输出: 1->2->5 示例 2: 输入: 1->1->1->2->3 ...
2019-10-16
0
395
A1004 Counting Leaves
A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child. Input Specification: Each in...
2019-09-24
0
523
首页
上一页
1
2
3
下一页
末页