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

Updated Solution.js for Github Externship #193

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

Conversation

the-sinner
Copy link

@the-sinner the-sinner commented Dec 19, 2021

Approach :

  1. Split the string delimited by space.
  2. Find the number with '?' in it.
  3. Calculate the value of the equation.
  4. Compare string length of answer and number with '?'
  5. Return -1 if different length else return digit at position of '?'

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