dexterpuru / leetcode_java

Archive for Leetcode solutions in Java
Creative Commons Zero v1.0 Universal
4 stars 15 forks source link

Added Detect Capital Problem #60

Closed PrinceKhatick closed 3 years ago

PrinceKhatick commented 3 years ago

Done, please review it and merge.

PrinceKhatick commented 3 years ago

@PrinceKhatick I've got two requests:

  • You're using methods like equals() and substring(), so kindly correct the time complexity. Also you need to specify the space complexity too. And give reasons for both.
  • Also, add the name of the problem statement in list_of_questions.txt

Will be doing that sure, Thanks for informing

PrinceKhatick commented 3 years ago

@PrinceKhatick Actually the space complexity will be of O(N) because of the variables s1, s2 and s4 which creates a new string of length N each time. Kindly change that.

Ok doing that and sending