Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

refactor: js - intervals#449

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mitchellirvin merged 1 commit intoneetcode-gh:mainfromaakhtar3:intervals
Jul 30, 2022
Merged

Conversation

aakhtar3
Copy link
Collaborator

No description provided.

};

const getBefore = (intervals, newInterval, index = 0, before = []) => {
const hasGap = ([ prevStart, prevEnd ], [ currStart, currEnd ]) =>
Copy link
Collaborator

Choose a reason for hiding this comment

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

same as others

Copy link
CollaboratorAuthor

Choose a reason for hiding this comment

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

@mitchellirvin
Since this in a while loop, we can either leave as is

consthasOverlap=()=> ...while(hasOverlap())

Move out of scoop

consthasOverlap=()=> ...constloop=()=>{while(hasOverlap())}

or add inline with comment

// hasOverlap = intervals[index] <= newInterval[1]while(intervals[index]<=newInterval[1])

Copy link
Collaborator

@mitchellirvinmitchellirvin left a comment
edited
Loading

Choose a reason for hiding this comment

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

@aakhtar3 this looks much better than the existing code! thanks for all the hard work.

the nit suggestions are optional, let me know when you're ready (and the merge conflicts have been handled) and I'll merge this

@aakhtar3aakhtar3force-pushed theintervals branch 3 times, most recently from1001524 to575b860CompareJuly 25, 2022 11:07
@mitchellirvinmitchellirvin merged commit69cf2c4 intoneetcode-gh:mainJul 30, 2022
@mitchellirvin
Copy link
Collaborator

thanks so much@aakhtar3 !

@aakhtar3aakhtar3 deleted the intervals branchJuly 30, 2022 21:25
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@mitchellirvinmitchellirvinmitchellirvin approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@aakhtar3@mitchellirvin

[8]ページ先頭

©2009-2025 Movatter.jp