Skip to content

ED-005. Reverse alternating k-Group #267

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

Closed
hamidgasmi opened this issue Aug 13, 2020 · 0 comments
Closed

ED-005. Reverse alternating k-Group #267

hamidgasmi opened this issue Aug 13, 2020 · 0 comments

Comments

@hamidgasmi
Copy link
Owner

Given the head of a Linked-List and a number k, reverse every alternating ‘k’ sized group from the head.

If, in the end, you are left with a group with less than ‘k’ elements, reverse it too.

E.g.

  • Inputs: k = 2, 1->2->3->4->5->6->7->8->null
  • Output: 2->1->3->4->6->5->7->8->null
@hamidgasmi hamidgasmi self-assigned this Aug 13, 2020
@hamidgasmi hamidgasmi changed the title EDU. Reverse alternating k-Group EDU-1. Reverse alternating k-Group Aug 16, 2020
@hamidgasmi hamidgasmi changed the title EDU-1. Reverse alternating k-Group EDU-2. Reverse alternating k-Group Aug 16, 2020
@hamidgasmi hamidgasmi changed the title EDU-2. Reverse alternating k-Group ED-003. Reverse alternating k-Group Aug 16, 2020
@hamidgasmi hamidgasmi changed the title ED-003. Reverse alternating k-Group ED-005. Reverse alternating k-Group Aug 24, 2020
@hamidgasmi hamidgasmi added hard and removed medium labels Aug 24, 2020
hamidgasmi pushed a commit that referenced this issue Aug 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant