- 博客(11)
- 收藏
- 关注
原创 leetcode 160. Intersection of Two Linked Lists
leetcode 160. Intersection of Two Linked Lists(Easy)Write a program to find the node at which the intersection of two singly linked lists begins.For example, the following two linked lists:Exampl...
2019-10-11 16:24:39 139
原创 leetcode 155. Min Stack
leetcode 155. Min Stack(Easy)Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) – Push element x onto stack.pop() – Removes the element on to...
2019-10-09 13:46:34 156
原创 leetcode 141. Linked List Cycle
leetcode 141. Linked List Cycle(Easy)Given a linked list, determine if it has a cycle in it.To represent a cycle in the given linked list, we use an integer pos which represents the position (0-in...
2019-10-08 16:51:19 147
原创 leetcode 101. Symmetric Tree
leetcode 101. Symmetric Tree(Easy)Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree [1,2,2,3,4,4,3] is symmetric: 1 ...
2019-09-30 19:05:30 124
原创 leetcode 53. Maximum Subarray
leetcode 53. Maximum Subarray(Easy)Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum.Example:Input: [-2,1,-3,4...
2019-09-30 18:10:00 155
原创 MIT 6.828 2018 Lab 1 Booting a PC Part 1-2
Lab 1 Booting a PCPart 1: PC Bootstrap首先,你需要熟悉x86的汇编语言本次实验使用GNU 编译器, 生成的汇编代码是 AT&T格式的Exercise 1. Familiarize yourself with the assembly language materials available on the 6.828 reference pag...
2019-09-29 20:48:46 460
原创 leetcode 21. Merge Two Sorted Lists
21. Merge Two Sorted Lists(Easy)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.Example:Input: 1->2-...
2019-09-29 13:43:14 85
原创 leetcode 20. Valid Parentheses
leetcode 20. Valid Parentheses(Easy)Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.An input string is valid if:Open brackets...
2019-09-29 13:19:30 90
原创 leetcode 543. Diameter of Binary Tree
leetcode 543. Diameter of Binary TreeGiven a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary tree is the length of the longest path between any two n...
2019-09-28 20:21:08 102
原创 leetcode 70. Climbing Stairs
leetcode 70. Climbing StairsEasyYou are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?...
2019-09-28 16:13:09 157
原创 leetcode 121. Best Time to Buy and Sell Stock
leetcode-121 Best Time to Buy and Sell Stock(Easy)Say you have an array for which the ith element is the price of a given stock on day i.If you were only permitted to complete at most one transacti...
2019-09-28 15:47:34 104
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人