Skip to content

feat: add LeetCode problem 61#1227

Closed
ashikjhonson wants to merge 4 commits intoTheAlgorithms:masterfrom
ashikjhonson:master
Closed

feat: add LeetCode problem 61#1227
ashikjhonson wants to merge 4 commits intoTheAlgorithms:masterfrom
ashikjhonson:master

Conversation

@ashikjhonson
Copy link
Copy Markdown

@ashikjhonson ashikjhonson commented Feb 28, 2023

Description of Change

References

Checklist

  • Added description of change
  • Added file name matches File name guidelines
  • Added tests and example, test must pass
  • Relevant documentation/comments is changed or added
  • PR title follows semantic commit guidelines
  • Search previous suggestions before making a new one, as yours may be a duplicate.
  • I acknowledge that all my contributions will be made under the project's license.

Notes:

@github-actions github-actions Bot added the Leetcode folder changes Changes to Leetcode folder. Known CI issues. label Feb 28, 2023
Comment thread leetcode/src/61.c Outdated
Comment thread leetcode/DIRECTORY.md Outdated
Comment thread leetcode/src/61.c Outdated
Comment thread leetcode/src/61.c
Comment thread leetcode/src/61.c Outdated
Comment thread leetcode/src/61.c
Comment thread leetcode/src/61.c Outdated
Comment thread leetcode/src/61.c Outdated
}
if(count!=0)
k = k%count;
while(k--)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your solution essentially rotated the list right by one for k times, it would be more efficient to slice the list in two at the right location then stitch them back together.

Copy link
Copy Markdown
Author

@ashikjhonson ashikjhonson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

@ashikjhonson ashikjhonson requested review from CascadingCascade and alexpantyukhin and removed request for alexpantyukhin March 2, 2023 17:43
@ashikjhonson ashikjhonson requested review from CascadingCascade and alexpantyukhin and removed request for CascadingCascade and alexpantyukhin March 2, 2023 17:43
@ashikjhonson ashikjhonson closed this by deleting the head repository Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Leetcode folder changes Changes to Leetcode folder. Known CI issues.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants