You are using an outdated browser. Please update your browser for a better user experience.

Problems for April 13, 2021

Reverse Groups of Letters

strings current

Reverse groups of letters for each word. Avoid reversing any non-letter characters.


  • If you would like to, you can assume you have two helper methods for (A) determining if a character is a letter and (B) for reversing a substring.
  • New line characters, white space, tabs, and numerical c...

String to Integer

strings current

Given a String of any number within the bounds of int, convert your String into an integer and return the result!

The bounds of int are -2^31 and 2^31 - 1

Input s = "439" Output: 439

Input t = "5" Output: 5

Input string = "123456789" Output: 123456789

Hint: Powers of 10 will be especially...

Text Justification

strings current

Given an array of words and a width maxWidth, format the text such that each line has exactly maxWidth characters and is fully (left and right) justified.

You should pack your words in a greedy approach; that is, pack as many words as you can in each line. Pad extra spaces ' ' when necessary so t...