Skip to content

Conversation

@YogenderSha
Copy link

@YogenderSha YogenderSha commented Jul 15, 2023

Updated the removeTrailingEqualSigns method with StringBuilder .

Instead of repeatedly creating new strings in the while loop, you can use a StringBuilder to remove the trailing equal signs. A stringBuilder is an effiecient way to replace strings without consuming memory due to the immutability of string.

Instead of repeatedly creating new strings in the while loop, you can use a StringBuilder to remove the trailing equal signs. A stringBuilder is an effiecient way to use strings without consuming memory due to the immutability of string. 

Read here more about StringBuilder  : https://stackoverflow.com/questions/41219283/advantage-of-string-over-stringbuilder-in-java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant