LeetCode
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 评论 -
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, given s ...原创 2019-04-10 22:14:17 · 177 阅读 · 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——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 · 154 阅读 · 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 · 177 阅读 · 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 评论 -
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 · 543 阅读 · 0 评论 -
牛客 编程题 —— 判断题
编程题 判断题 题目描述: 牛牛参加了一场考试,考试包括n道判断题,每做对一道题获得1分,牛牛考试前完全没有准备,所以考试只能看缘分了,牛牛在考试中一共猜测了t道题目的答案是"正确",其他的牛牛猜为"错误"。考试结束后牛牛知道实际上n道题中有a个题目的答案应该是"正确",但是牛牛不知道具体是哪些题目,牛牛希望你能帮助他计算可能获得的最高的考试分数是多少。 输入描述: 输入包括一行,一行中有三个正整...原创 2019-03-12 23:37:33 · 450 阅读 · 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 评论