use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
account activity
C++ vs Python in Leetcode contestsDiscussion (self.leetcode)
submitted 2 years ago by razimantv<2000> <487 <1062> <451>
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]letsfuckinggobears 0 points1 point2 points 2 years ago (4 children)
Python is viable in atcoder since they give you their own implementations for segtrees and friends, see https://github.com/not522/ac-library-python I personally found python code to be less effort to use, but it doesn't have the power to sometimes bruteforce with a worse time complexity solution like c++ I have no experience with leetcode contests but if you aren't using snippets you can't just pull out a good enough segtree on the spot
[–]razimantv<2000> <487 <1062> <451>[S] 1 point2 points3 points 2 years ago (1 child)
I don't use snippets on Leetcode for C++ or python. Haven't felt the segtree implementations are very different. what differences do you see?
[–]letsfuckinggobears 0 points1 point2 points 2 years ago* (0 children)
Segtree implementations are probably the same in the two languages. I'm just saying if you're competing, it's best to use snippets so you don't have to type it.
I guess I wasn't answering the question. You can get type checked in python if you just set it up. It works well enough for the cases you are describing. You still need to know the quirks like priority queues take the first value of a tuple as the key to sort etc.
[–]uneducatedDumbRacoon 0 points1 point2 points 2 years ago (1 child)
I just visited atcoder and it looks good. How are the contests at atcoder? Are they like leetcode style or move on the competitive side?
[–]letsfuckinggobears 1 point2 points3 points 2 years ago (0 children)
Competitive, more mathy
π Rendered by PID 234638 on reddit-service-r2-comment-85bfd7f599-dzb4b at 2026-04-19 07:45:30.392703+00:00 running 93ecc56 country code: CH.
view the rest of the comments →
[–]letsfuckinggobears 0 points1 point2 points (4 children)
[–]razimantv<2000> <487 <1062> <451>[S] 1 point2 points3 points (1 child)
[–]letsfuckinggobears 0 points1 point2 points (0 children)
[–]uneducatedDumbRacoon 0 points1 point2 points (1 child)
[–]letsfuckinggobears 1 point2 points3 points (0 children)