程序媛养成计划
Emma__M
老和山职业技术学院研究僧一枚
展开
-
LeetCode——linked-list-cycle-ii 判断链表是否有环,如果有,返回环的入口
LeetCode——linked-list-cycle-ii 判断链表是否有环,如果有,返回环的入口题目描述:Given a linked list, return the node where the cycle begins. If there is no cycle, returnnull.Follow up:Can you solve it without using extra ...原创 2019-04-10 17:21:10 · 158 阅读 · 0 评论 -
牛客 编程题 —— 判断题
编程题 判断题题目描述:牛牛参加了一场考试,考试包括n道判断题,每做对一道题获得1分,牛牛考试前完全没有准备,所以考试只能看缘分了,牛牛在考试中一共猜测了t道题目的答案是"正确",其他的牛牛猜为"错误"。考试结束后牛牛知道实际上n道题中有a个题目的答案应该是"正确",但是牛牛不知道具体是哪些题目,牛牛希望你能帮助他计算可能获得的最高的考试分数是多少。输入描述:输入包括一行,一行中有三个正整...原创 2019-03-12 23:37:33 · 449 阅读 · 0 评论 -
LeetCode——triangle 数塔问题
LeetCode——triangle 薯塔 数塔问题题目描述:Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the following tria...原创 2019-06-16 16:32:24 · 542 阅读 · 0 评论 -
LeetCode ——single-number 从一个数列中找出只出现一次的数,不借助额外内存,时间复杂度O(n)
LeetCode ——single-number题目描述:Given an array of integers, every element appears twice except for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you imp...原创 2019-06-14 20:19:28 · 279 阅读 · 0 评论 -
剑指offer——最大连续子序列和
剑指offer——最大连续子序列和题目描述:HZ偶尔会拿些专业问题来忽悠那些非计算机专业的同学。今天测试组开完会后,他又发话了:在古老的一维模式识别中,常常需要计算连续子向量的最大和,当向量全为正数的时候,问题很好解决。但是,如果向量中包含负数,是否应该包含某个负数,并期望旁边的正数会弥补它呢?例如:{6,-3,-2,7,-15,1,2,2},连续子向量的最大和为8(从第0个开始,到第3个为止...原创 2019-04-03 16:27:46 · 252 阅读 · 0 评论 -
LeetCode——symmetric tree 对称树
LeetCode——symmetric tree 对称树题目描述:Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).Note:Bonus points if you could solve it both recursively and iterative...原创 2019-04-08 15:49:09 · 176 阅读 · 0 评论 -
LeetCode——same tree 判断两棵树是否相同
LeetCode——same tree 判断两棵树是否相同题目描述:Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical and the nodes h...原创 2019-04-08 11:51:59 · 152 阅读 · 0 评论 -
LeetCode——minimum-depth-of-binary-tree 二叉树的最小深度
LeetCode——minimum-depth-of-binary-tree 二叉树的最小深度题目描述:Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node down to the neares...原创 2019-04-07 15:05:36 · 149 阅读 · 0 评论 -
LeetCode——word break 字符串切割
LeetCode——word break 字符串切割题目描述:Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words.For example, givens ...原创 2019-04-10 22:14:17 · 176 阅读 · 0 评论 -
LeetCode——merge-two-sorted-lists合并两个有序链表
LeetCode——merge-two-sorted-lists合并两个有序链表题目描述:Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.把两个有序链表合并成一...原创 2019-06-11 17:01:41 · 156 阅读 · 0 评论