排序:
默认
按更新时间
按访问量

算法设计与分析(七)

贪心算法 题目 这次我们选择两题贪心算法作为练习,这两道题目是有关系的,一个是比较基础的贪心,另一个是难一点的贪心。 Jump Game Given an array of non-negative integers, you are initially positioned at the fir...

2018-10-18 23:46:51

阅读数:5

评论数:0

算法设计与分析(六)(上周第五周的写错标题,这才是真正的第六周)

Merge k Sorted Lists 题目 Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. Example: Input: [ 1-&a...

2018-10-11 19:30:11

阅读数:4

评论数:0

算法设计与分析(六)

Is Graph Bipartite? 1. 题目 Given an undirected graph, return true if and only if it is bipartite. Recall that a graph is bipartite if we can split it’...

2018-10-04 10:04:31

阅读数:9

评论数:0

算法设计与分析第四周练习(图论)

Network Delay Time 1. 题目 There are N network nodes, labelled 1 to N. Given times, a list of travel times as directed edges times[i] = (u, v, w), whe...

2018-09-28 13:54:57

阅读数:10

评论数:0

算法分析与设计第三周练习(图论)

目录 Evaluate Division Reconstruct Itinerary 总结 Evaluate Division 1. 题目 Equations are given in the format A / B = k, where A and B are variables ...

2018-09-21 23:07:40

阅读数:9

评论数:0

算法设计与分析第二周练习

目录 Course Schedule(拓扑) Kth Largest Element in an Array(分治算法) Kth Largest Element in an Array 题目 Find the kth largest element in an unsorted arra...

2018-09-14 18:50:27

阅读数:15

评论数:0

算法设计与分析第一周练习

题目 Given n non-negative integers a1, a2, …, an , where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two e...

2018-09-07 00:01:37

阅读数:19

评论数:0

LeetCode--Keys and Rooms

Keys and Rooms 题目 There are N rooms and you start in room 0. Each room has a distinct number in 0, 1, 2, …, N-1, and each room may have some keys to...

2018-10-14 22:20:26

阅读数:2

评论数:0

安卓开发图片

2018-10-02 23:10:16

阅读数:17

评论数:0

3Sum

3Sum 1.题目 Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array whic...

2018-09-24 23:49:16

阅读数:12

评论数:0

LeetCode--Longest Common Prefix

Longest Common Prefix 题目 Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, retu...

2018-09-24 21:08:58

阅读数:14

评论数:0

LeetCode--Integer to Roman

Integer to Roman 1. 题目 Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. Symbol Value I 1 V ...

2018-09-23 23:16:13

阅读数:12

评论数:0

LeetCode--Roman to Integer

Roman to Integer 1. 题目 Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. Symbol Value I 1 V ...

2018-09-23 21:22:49

阅读数:11

评论数:0

LeetCode--Clone Graph

Clone Graph 1. 题目 Given the head of a graph, return a deep copy (clone) of the graph. Each node in the graph contains a label (int) and a list (Lis...

2018-09-23 20:03:36

阅读数:16

评论数:0

LeetCode--String to Integer (atoi)

String to Integer (atoi) 1 题目 Implement atoi which converts a string to an integer. The function first discards as many whitespace characters as n...

2018-09-22 10:42:26

阅读数:12

评论数:0

LeetCode--Reverse Integer

Reverse Integer 题目 Given a 32-bit signed integer, reverse digits of an integer. Example 1: Input: 123 Output: 321 Example 2: Input: -123 Out...

2018-09-16 23:39:02

阅读数:12

评论数:0

LeetCode--ZigZag Conversion

ZigZag Conversion 题目 The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may wan...

2018-09-16 21:36:49

阅读数:11

评论数:0

LeetCode--Search a 2D Matrix II(分治策略)

Search a 2D Matrix II 题目 Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Inte...

2018-09-15 14:30:52

阅读数:15

评论数:0

LeetCode--Merge k Sorted Lists--分治策略

Merge k Sorted Lists--分治策略 题目 Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. Example Input: ...

2018-09-14 23:26:37

阅读数:9

评论数:0

LeetCode--Median of Two Sorted Arrays

Median of Two Sorted Arrays 题目 There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays....

2018-09-10 16:32:39

阅读数:16

评论数:0

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