Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

completed part 1-4 #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

completed part 1-4 #7

wants to merge 1 commit into from

Conversation

nlcurry
Copy link

@nlcurry nlcurry commented Jun 27, 2016

No description provided.

@nlcurry
Copy link
Author

nlcurry commented Jun 27, 2016

Pseudocode:

  1. did this in class
  2. if else statement that checks whether it's at the leaf or not. If so, return one for the last operator. Is not, keep adding one to the count.
  3. Seems like this would be the same as the infix function, just reorganized.
  4. If else statement that checks whether the value of the node is an operator and whether it matches the input. Need to filter digit inputs as well (regex). if not at leaf, keep recursion going, else return false.

TDD:

  1. a)Make sure no digits slip through (regex)
    b) Make sure only operators are printed(no "&", "#", etc)
    c) Make sure it doesn't print the same operator more than once
  2. a)Result should always be greater than 1 or else return a statement
    b) Make sure it doesn't count operators
    c) Make sure it doesn't count anything other than digits
  3. a) Try different equations
    b) First value should always be a digit(vice versa for prefix)
    c)Last value should always be the root.(vice versa for prefix)
  4. a) return false if not an operator and also not a number
    b) return false if input is a number
    c) return true if an operator

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