CtCI-6th-Edition
CtCI-6th-Edition copied to clipboard
Update QuestionA.java
Since alphabet set still consists of 26 characters going by the QuestionB answer
Alphabet set contains 26 characters, so if any string contains more than 26 characters that means characters are not unique
@wish2gift it's a string, so it can contain any 'character' apart from the standard 26 English alphabets. Essentially the 256 characters can be held in the string data type, so you cannot exclude the other 220 characters. For eg: a string - "hEL1O" is a valid string, which has both upper case alphabets that you need to check (26 upper case characters), and lower case characters (26 lower case) and numbers (10 numbers) etc. Hence, all edge cases need to be evaluated.
Going by that logic, QuestionB.java needs to be corrected!
@wish2gift Please do suggest those changes and I can review them