halfrost / LeetCode-Go

✅ Solutions to LeetCode by Go, 100% test coverage, runtime beats 100% / LeetCode 题解
https://books.halfrost.com/leetcode
MIT License
32.76k stars 5.68k forks source link

Make the binary search solution more concise for Sqrt x #146

Closed hanlins closed 3 years ago

hanlins commented 3 years ago

Signed-off-by: Hanlin Shi shihanlin9@gmail.com

Add a more concise binary search solution.

codecov-commenter commented 3 years ago

Codecov Report

Merging #146 (60d3b04) into master (ec597e2) will increase coverage by 0.02%. The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #146      +/-   ##
==========================================
+ Coverage   71.87%   71.90%   +0.02%     
==========================================
  Files         692      692              
  Lines       12143    12138       -5     
==========================================
  Hits         8728     8728              
+ Misses       3106     3101       -5     
  Partials      309      309              
Impacted Files Coverage Δ
leetcode/0069.Sqrtx/69. Sqrt(x).go 30.00% <0.00%> (+10.00%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ec597e2...60d3b04. Read the comment docs.