__goku__'s blog

By __goku__, history, 4 years ago, In English

The following problem: Your text to link here... requires DP + 2D BIT according to comment section but I have never used 2D BIT anywhere except for learning its basic concept. Can someone explain how to solve this problem using this concept? Thanks in advance.

Full text and comments »

  • Vote: I like it
  • +7
  • Vote: I do not like it

By __goku__, history, 4 years ago, In English

I have written an article on how to implement lower_bound() function of C++ in Java by creating our own method and also using java inbuilt functions. Feel free to comment if you have any query.

Link: https://medium.com/@ssrivastava990/alternative-implementation-of-lower-bound-in-java-23ec40a825ec

Full text and comments »

  • Vote: I like it
  • +3
  • Vote: I do not like it

By __goku__, 4 years ago, In English

Lets share the best meme related to programming we have!

Ps: I know its a bit old but still relatable.

Full text and comments »

  • Vote: I like it
  • -8
  • Vote: I do not like it

By __goku__, history, 4 years ago, In English

My program is running in O(n) time (I hope so) but it is showing TLE in java. Can anyone please tell me what am I doing wrong here. I have used fast input with both BufferedWriter and PrintWriter but it is still showing tle. I know there is no problem with my logic because the same logic is accepted in C++. So can someone please tell me what is wrong with my java code.

Solution: Java: 82284306 CPP: 82285437

Problem: 1324D - Pair of Topics

Edit 2: The code worked after I replaced array with ArrayList. Can anyone explain to me why did this happen? Thanks in advance.

Full text and comments »

  • Vote: I like it
  • +2
  • Vote: I do not like it

By __goku__, history, 5 years ago, In English

Many coders who like coding in Java for competitive coding have faced a “TLE” even though their logic and complexity are well within the bounds. The problem in those cases lies in our way of I/O. Using Scanner and System.out.println() in a code is quite convenient but often make our program slow. I am sharing my article in which I have shared my template. I urge fellow coders to check this out and please do notify me if anything can be improved. Thank You!

Full text and comments »

  • Vote: I like it
  • -12
  • Vote: I do not like it