From ab7fcb219ce3d06f90623efb92abdb4d09d56fce Mon Sep 17 00:00:00 2001 From: openset Date: Mon, 8 Jul 2019 10:55:47 +0800 Subject: [PATCH] Add: v1.4.2 --- internal/version/version.go | 2 +- problems/all-paths-from-source-lead-to-destination/README.md | 2 +- problems/campus-bikes/README.md | 4 +++- problems/confusing-number/README.md | 1 + 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/internal/version/version.go b/internal/version/version.go index 7f825ba77..45b862cf7 100644 --- a/internal/version/version.go +++ b/internal/version/version.go @@ -7,7 +7,7 @@ import ( "github.com/openset/leetcode/internal/base" ) -const version = "1.4.1" +const version = "1.4.2" var CmdVersion = &base.Command{ Run: runVersion, diff --git a/problems/all-paths-from-source-lead-to-destination/README.md b/problems/all-paths-from-source-lead-to-destination/README.md index 4dfc75add..763ef1259 100644 --- a/problems/all-paths-from-source-lead-to-destination/README.md +++ b/problems/all-paths-from-source-lead-to-destination/README.md @@ -9,7 +9,7 @@                  [Next >](https://github.com/openset/leetcode/tree/master/problems/missing-element-in-sorted-array "Missing Element in Sorted Array") -## 1059. All Paths from Source Lead to Destination (Hard) +## 1059. All Paths from Source Lead to Destination (Medium)

Given the edges of a directed graph, and two nodes source and destination of this graph, determine whether or not all paths starting from source eventually end at destination, that is:

diff --git a/problems/campus-bikes/README.md b/problems/campus-bikes/README.md index 33bcf4b5f..9c61d3348 100644 --- a/problems/campus-bikes/README.md +++ b/problems/campus-bikes/README.md @@ -63,7 +63,9 @@ Worker 0 grabs Bike 0 at first. Worker 1 and Worker 2 share the same distance to ### Hints
Hint 1 -Sort the elements by distance then in case of tie, sort them by the index of the worker, and if there still ties sort then by the index of the bike.Follow up: Can you do this in less than O(nlogn) time, where n is the total number of pairs between workers and bikes?. +

Sort the elements by distance. In case of a tie, sort them by the index of the worker. After that, if there are still ties, sort them by the index of the bike.

+ +

Can you do this in less than O(nlogn) time, where n is the total number of pairs between workers and bikes?

diff --git a/problems/confusing-number/README.md b/problems/confusing-number/README.md index 19a85953c..8a66a3d20 100644 --- a/problems/confusing-number/README.md +++ b/problems/confusing-number/README.md @@ -75,6 +75,7 @@ We get an invalid number after rotating 25. ### Similar Questions 1. [Strobogrammatic Number](https://github.com/openset/leetcode/tree/master/problems/strobogrammatic-number) (Easy) + 1. [Confusing Number II](https://github.com/openset/leetcode/tree/master/problems/confusing-number-ii) (Hard) ### Hints