Pocket Gems | Write a String like class
Anonymous User
661

Implement a String like class with methods as below, with space complexity of 0(1) for all the methods

Class Str {
public Str(char[] arr) // constructor

public char charAt(int idx);

public Str substring(int startIdx, int length); // should use constant space

}

Comments (3)