Hello, i am newbie and c++ coder, give me an advice, should i learn Python or Java, or both of them or there's no need to learn these languages? Thank you!
# | User | Rating |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3823 |
3 | Benq | 3738 |
4 | Radewoosh | 3633 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | ksun48 | 3390 |
10 | gamegame | 3386 |
# | User | Contrib. |
---|---|---|
1 | cry | 164 |
1 | maomao90 | 164 |
3 | Um_nik | 163 |
4 | atcoder_official | 160 |
4 | adamant | 160 |
6 | -is-this-fft- | 158 |
7 | awoo | 157 |
8 | TheScrasse | 154 |
8 | Dominater069 | 154 |
8 | nor | 154 |
Name |
---|
go for c++
It fully depends on what you are doing. For CP C++ would be the best, for ML its python and Java for Web/App.
The problem is that Java isn't even that great for web dev tbh. JS and it's variants are just so much more prevalent in the real world... The only legit time I've ever actually used Java in the real world is for android development unfortunately, other than making games for fun.
Java isn't really strong in anything to be honest... it's main strength is that it's very widely used. The phrase "too big to fail" comes to mind there.
Java had been removed from IOI since 2021. I don't think that it offers anything that the other programming languages can't do much better.
Python is very good for quick prototyping, for generating testcases when stress testing and for other automation tasks. It is also useful for the things other than competitive programming, so learning it is a good idea.
The main disadvantage of C++ language is poor safety. It's very easy to shoot yourself in the foot when not paying enough attention, and then spend a ridiculous amount of time on debugging. There are other programming languages, which are almost as fast as C++ and also much safer. Maybe Rust? But it's still not clear, which programming language will end up displacing C++ for new projects in the future. There are too many of them and they are all still evolving.
why was java removed?!
I've been running solo python so far on codeforces.
Speaking from a purely competitive programming perspective, C++ is superior for several reasons:
Convention: Every single contest will have C++ as an accepted language. To my knowledge, C++ is the only language allowed for use in my country's IOI qualifier.
Speed: C++ is the fastest out of the languages you listed. With other languages, you may have higher chance to receive the dreaded TLE error.
Standard: All testers, problemsetters, etc are likely designing the problems to be solved with c++.
I personally still use Python because I feel most comfortable with it. However. knowing the properties of your language of choice is important. In my case, I often have to code around Python's pitiful recursion limit. If you're completely new to coding, I would recommend that you don't do competitive programming / algorithmic stuff and instead do basic projects, like tic-tac-toe, etc. I don't think you will enjoy solving codeforces problems if you're busy wrestling your language at the same time.
Also, it goes without saying that outside of competitive programming, all three languages have their own strengths and cover very different scopes.
You can try pyrival library. Its having generator for python named bootstrap which is very helpful in recursion. In addition it is having fast IO template through which you can also submit your python 3.7 code in pypy2(which is very fast). It also got many cool things like alternative of c++ ordered set in python.
most of the competitve programmers prefer c++ for its sheer speed , and extensive STL... but i have also seen people reach CM programming in java!! Go for C++ since you know C++!! Toss python
uwi, an igm, uses java
JAVA GANG...WE STAND
Start with whatever you know now... You'll eventually shift to something which you're comfortable soon
Avoid j*va :3
Why not C# on codeforces?
C# is exists on codeforces."C# Mono 6.8"
Yes, but I found people rarely use it, along with pascal.
For things like recursion you should always use C++, because recursion takes more time to compile in python
More time? Often recursion doesn't even compile in python, to tell you the truth!.. But luckily none of that prevents us from successfully running it :)
imo c++ is the best for competitive programming but sometimes python is much easier to work with
golang
For competitive programming c++ is probably the best choice. Here is an example from Junior Serbian Olympiad in Informatics 2019.
The allowed languages were c++ and python. Time limit was the same for both languages. The 4th problem involved quite a big input data. In order for optimal python solution to pass, they had to increase time limit and put smaller test cases. When they did that, a simple brute force was able to pass for c++ solution, while python programmers had to come up with an optimal solution.
It was a huge advantage for c++ programmers because they can write brute force in 10 minutes and solve an entire problem, giving them time to work on other problems.
Java and Python are Interpretive languages which run on virtual machines,and they are slower. C++ is a compiled language,C/C++ code will be compiled to machine code,and it's faster. So,due to avoid time limit exceed errors,I think C/C++ is best on online judging websites. Of course,Java and Python have their uses!