自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(16)
  • 资源 (1)
  • 收藏
  • 关注

原创 Week 15 Length of Last Word

问题概述 Given a string s consists of upper/lower-case alphabets and empty space characters ’ ', return the length of last word in the string. If the last word does not exist, return 0. Note: A word is de...

2018-12-27 21:48:42 84

原创 Project

Capacitated Facility Location Problem问题描述Submission算法设计结果 问题描述 Suppose there are n facilities and m customers. We wish to choose: (1) which of the n facilities to open (2) the assignment of customers...

2018-12-26 20:09:12 117

原创 Week 14 Min Stack

155.Min Stack 问题概述 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 top of the sta...

2018-12-09 18:14:40 109

原创 Week 13 Unique Paths

62.Unique Paths 问题概述 A robot is located at the top-left corner of a m x n grid (marked ‘Start’ in the diagram below). The robot can only move either down or right at any point in time. The robot is tr...

2018-12-02 19:07:40 94

原创 Week 12 Binary Tree Inorder Traversal

94.Binary Tree Inorder Traversal 问题概述 Given a binary tree, return the inorder traversal of its nodes’ values. Example Input: [1,null,2,3] 1 \ 2 / 3 Output: [1,3,2] 分析 二叉树遍历: 前序遍历:...

2018-11-25 21:02:28 83

原创 Week 11 Best Time to Buy and Sell Stock with Cooldown

309.Best Time to Buy and Sell Stock with Cooldown 问题概述 Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may c...

2018-11-18 21:54:52 133

原创 Week 10 Minimum Path Sum

64. Minimum Path Sum 问题概述 Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path. Note: You can only move ...

2018-11-11 20:34:53 104

原创 Week 9 Remove Duplicates From Sorted List

83. Remove Duplicates From Sorted List 问题概述 Given a sorted linked list, delete all duplicates such that each element appear only once. Example 1: Input: 1->1->2 Output: 1->2 Example 2: Input...

2018-11-04 18:41:32 78

原创 Week 8 Remove Nth Node From End of List

19.Remove Nth Node From End of List 问题概述 Given a linked list, remove the n-th node from the end of list and return its head. Example: Given linked list: 1->2->3->4->5, and n = 2. After rem...

2018-10-28 18:36:52 96

原创 Week 7 Generate Parentheses

22. Generate Parentheses 问题概述 Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For example, given n = 3, a solution set is: [ “((()))”, “(()())”,...

2018-10-21 21:14:15 78

原创 Week 6 Construct Binary Tree from Preorder and Inorder Traversal

105. Construct Binary Tree from Preorder and Inorder Traversal 问题概述 Given preorder and inorder traversal of a tree, construct the binary tree. Note: You may assume that duplicates do not exist in the ...

2018-10-15 15:26:05 135

原创 Week 5 Count and Say

38. Count and Say 问题概述 The count-and-say sequence is the sequence of integers with the first five terms as following: 1. 1 2. 11 3. 21 4. 1211 5. 111221 1 is read off as “one 1” or 11 11 is read...

2018-10-13 23:11:19 82

翻译 Week 4 Regular Expression Matching

10.Regular Expression Matching 问题概述 Given an input string (s) and a pattern §, implement regular expression matching with support for ‘.’ and ‘*’. '.' Matches any single character. '*' Matches zero or...

2018-09-30 17:13:09 73

原创 Week3 Same Tree

100.Same Tree 问题描述 题目来自LeetCode Depth-first Search Given two binary trees, write a function to check if they are the same or not. Two binary trees are considered the same if they are structurally iden...

2018-09-28 17:11:37 131

原创 week 2 Add Two Numbers

2. Add Two Numbers You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two ...

2018-09-15 21:33:33 105

原创 week 1 Search Insert Position

Search Insert Position 题目来自leetcode Array部分 Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order....

2018-09-08 11:34:48 120

后缀表达式postfix

基于Java的postfix后缀表达式检测,主要用于判断所输入串的是否符合postfix后缀表达式规则,没有用于计算

2017-12-04

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除