Comments (2)
Hi @zhuangh
I think you probably didn't read my code carefully. Actually, I wrote two version of the solution, one is recursive version, another one is non-recursive version. (Although they have same function name but the function signature is different, and in the real function, I use random() to invoke these two helper )
Anyway, Thanks so much left your solution here.
P.S. the recursive version's helper just only 4 lines of code, it's almost 1/2 shorter than yours. ;-)
from leetcode.
My bad.
Great! Thanks for pointing out!
from leetcode.
Related Issues (20)
- Array out of bounds in ”Divide Two Integers“ ‘s solution.
- ReadMe Description error
- 09.palindrome-number HOT 1
- reverse-integer more easy understand
- please include a contributing.md in your repo HOT 1
- question1 twoSum
- 160. intersectionOfTwoLinkedLists.cpp HOT 2
- What is the license for this repository? HOT 1
- Problem 400: Nth Digit - is Medium difficulty on LeetCode not Easy difficulty
- The xidel installed by query_problem.sh is not support for MacOs Catalina 10.15.3 HOT 1
- All examples as absent
- A problem about 315. Count of Smaller Numbers After Self HOT 1
- out of range HOT 1
- Add a daily challenge section
- The install_xidel function for mac in query_problem.sh is invaliad HOT 1
- 1: Two Sum: Go: signature is too broad
- 3sum smaller is missing
- TenthLine - bash
- OutOfMemory exception HOT 3
- Runtime Error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from leetcode.