Skip to content

Conversation

@Carr1005
Copy link

@Carr1005 Carr1005 commented Mar 4, 2018

  • Add a solution described in CtCI-6th, which use a number as bit vector, toggle the bits. Check that at most one bit is set to 1 subsequently. Space complexity: O(1).
  • In this method, we need to assume input string only contains English alphabet and space, so revise the test code to filter the unacceptable inputs to this new method.
    2018-03-04 10 52 27
  • For About ch 1 ex 4 solution #3 which @viatsko mentioned, add .toLowerCase() to make input which contains uppercase letters available, also add one input for testing in test code.

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