Блог пользователя djdibs

Автор djdibs, история, 6 лет назад, По-английски

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.

  • Проголосовать: нравится
  • -6
  • Проголосовать: не нравится

»
6 лет назад, скрыть # |
 
Проголосовать: нравится +6 Проголосовать: не нравится

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().

»
6 лет назад, скрыть # |
 
Проголосовать: нравится +9 Проголосовать: не нравится

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.

»
6 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится +10 Проголосовать: не нравится

SecondThread has excellent video about Java setup for competitive programming. link

»
6 лет назад, скрыть # |
 
Проголосовать: нравится +37 Проголосовать: не нравится

switch to C++, I used java for 2 years and C++ is a lot better

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

if you want, you can use my code:

code
»
5 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится +5 Проголосовать: не нравится

tips to get better at java

1.u dont,use c++ instead

»
5 лет назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

CF community has become so condescending these days, some person is new to CP and is asking for help/resources. Yet, I see 6 down-votes in this blog.