Hello Guys,
I am a beginner in the Competitive Programming world and am using java, so can anyone help me so as to how to learn/master the language, what resources should be used any books, etc.
Thanks and regards, See you in the arena.
# | User | Rating |
---|---|---|
1 | tourist | 3778 |
2 | Benq | 3592 |
3 | ecnerwala | 3521 |
4 | Um_nik | 3423 |
5 | jiangly | 3375 |
6 | Petr | 3342 |
7 | Radewoosh | 3337 |
8 | scott_wu | 3313 |
9 | maroonrk | 3265 |
10 | yosupo | 3259 |
# | User | Contrib. |
---|---|---|
1 | Errichto | 202 |
2 | 1-gon | 201 |
3 | rng_58 | 194 |
4 | SecondThread | 193 |
5 | awoo | 187 |
6 | vovuh | 183 |
7 | Um_nik | 182 |
8 | antontrygubO_o | 177 |
9 | Ashishgup | 175 |
10 | -is-this-fft- | 171 |
Hello Guys,
I am a beginner in the Competitive Programming world and am using java, so can anyone help me so as to how to learn/master the language, what resources should be used any books, etc.
Thanks and regards, See you in the arena.
Name |
---|
I am describing some things which I consider while solving problems with Java:
a). Use BufferedReader class or user defined FastReader class for fast I/O, instead of using Scanner class. You can see here for more info.
b). Prefer Java 8 over Java 11. Java 8 has slightly better throughput than Java 11. Still you can use anything, it won't affect your performance drastically.
c). Most importantly, master collection framework in Java. it helps you to use and manipulate data structures efficiently.
d). Use PrintWriter class for producing output in the console. It is much faster then the general System.out.print().
Thanks for the information.
I suggest you just start off by learning the minimum required basics, and learning other things as and when needed. Because there are many optimizations in Java that you won't learn in any programming course but only by experiencing them yourselves.
Can give some instances of what you are saying.
Using ArrayDeque over Stack and Queue is one that comes to mind
Thanks.
you can read book CP3 or CP4 by stevan falix halim those are master peices with codes both in JAVA and CPP
SecondThread has excellent video about Java setup for competitive programming. link
Thanks for the help.
switch to C++, I used java for 2 years and C++ is a lot better
I would recommend learning C++. It will make a big impact on the amount of time you spend running tests and coding the solution. Moreover 90% of solutions/tutorials are coded in C++ so it would only make sense to learn C++ for competitive programming.