自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(11)
  • 收藏
  • 关注

原创 635. Design Log Storage System

635. Design Log Storage System方法:方法:discussion:https://leetcode.com/problems/design-log-storage-system/discuss/105049/C++-easy-to-understand-solution思路:class LogSystem {public: unordered_map...

2019-07-08 03:42:21 401

原创 923. 3Sum With Multiplicity

923. 3Sum With Multiplicity方法0: dfs, TLE方法1: two pointersGiven an integer array A, and an integer target, return the number of tuples i, j, k such that i < j < k and A[i] + A[j] + A[k] == targ...

2019-07-07 05:21:43 270

原创 773. Sliding Puzzle

773. Sliding Puzzle方法1: bfsComplexityOn a 2x3 board, there are 5 tiles represented by the integers 1 through 5, and an empty square represented by 0.A move consists of choosing 0 and a 4-directional...

2019-07-07 04:29:34 302

原创 684. Redundant Connection

684. Redundant Connection方法1:ComplexityIn this problem, a tree is an undirected graph that is connected and has no cycles.The given input is a graph that started as a tree with N nodes (with distinc...

2019-07-07 03:21:15 190

原创 773. Sliding Puzzle

On a 2x3 board, there are 5 tiles represented by the integers 1 through 5, and an empty square represented by 0.A move consists of choosing 0 and a 4-directionally adjacent number and swapping it.Th...

2019-07-07 02:45:50 271

原创 924. Minimize Malware Spread

924. Minimize Malware Spread方法1: union findIn a network of nodes, each node i is directly connected to another node j if and only if graph[i][j] = 1.Some nodes initial are initially infected by malw...

2019-07-06 11:35:33 153

原创 609. Find Duplicate File in System

609. Find Duplicate File in System方法1: hashGiven a list of directory info including directory path, and all the files with contents in this directory, you need to find out all the groups of duplicate...

2019-07-06 01:56:57 109

原创 1053. Previous Permutation With One Swap

1053. Previous Permutation With One Swap方法1:Given an array A of positive integers (not necessarily distinct), return the lexicographically largest permutation that is smaller than A, that can be made...

2019-07-03 13:15:03 191

原创 278. First Bad Version

278. First Bad Version方法1: binary searchYou are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of your product fails the quality check. Sin...

2019-07-02 10:46:42 86

原创 409. Longest Palindrome

409. Longest Palindrome方法1:易错点:Given a string which consists of lowercase or uppercase letters, find the length of the longest palindromes that can be built with those letters.This is case sensitive...

2019-07-01 07:45:03 159

原创 557. Reverse Words in a String III

557. Reverse Words in a String III方法1: two pointersGiven a string, you need to reverse the order of characters in each word within a sentence while still preserving whitespace and initial word order....

2019-07-01 04:10:29 117

空空如也

空空如也

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

TA关注的人

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