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

Day 331 #666

Closed
vaskoz opened this issue Jul 19, 2019 · 0 comments · Fixed by #667
Closed

Day 331 #666

vaskoz opened this issue Jul 19, 2019 · 0 comments · Fixed by #667
Assignees

Comments

@vaskoz
Copy link
Owner

vaskoz commented Jul 19, 2019

Good morning! Here's your coding interview problem for today.

This problem was asked by LinkedIn.

You are given a string consisting of the letters x and y, such as xyxxxyxyy. In addition, you have an operation called flip, which changes a single x to y or vice versa.

Determine how many times you would need to apply this operation to ensure that all x's come before all y's. In the preceding example, it suffices to flip the second and sixth characters, so you should return 2.

@vaskoz vaskoz self-assigned this Jul 19, 2019
@vaskoz vaskoz mentioned this issue Jul 20, 2019
@vaskoz vaskoz mentioned this issue Feb 25, 2020
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 a pull request may close this issue.

1 participant