Jens Neuhalfen

This & That

Random Ramblings about Life, the Universe, and Everything

profiling

LeetCode #8 : String to Integer (atoi)

Solution in python3: 28 ms, faster than 93.82% (plus python profiling)

[Jens Neuhalfen]

19 minutes read

This problem is quite simple and does not allow for many algorithmic improvements. In fact it would be difficult to come up with a non-optimal (bigger than \(O(n)\)) solution. This makes this problem a good candidate for benchmarking.

Recent posts

See more

Categories

About

Information security and software development are enablers for a successful company. During the last 20+ years of my working life I have always been convinced that outstanding success is only possible if everybody works together to find and reach a common goal.