Skip to content

create 1091-shortestpath-in-binary-matrix.cpp #3264

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

Merged
merged 7 commits into from
Feb 6, 2024
Merged

create 1091-shortestpath-in-binary-matrix.cpp #3264

merged 7 commits into from
Feb 6, 2024

Conversation

adityaiiitr
Copy link
Contributor

Note: I have used the same logic as it was described in the youtube video. Thanks!

Important

Please make sure the file name is lowercase and a duplicate file does not already exist before merging.

@adityaiiitr
Copy link
Contributor Author

Leetcode Question 787. Cheapest Flights Within K Stops

Previous Solution Provided: Github Solution

New Solution Added : Submission Link

Neetcode video: YT Link

@a93a
Copy link
Collaborator

a93a commented Feb 6, 2024

Your solution for both looks great!

However, I want to suggest a small edit for 787. Cheapest Flights Within K Stops problem.

There is already a solution using Dijkstras, and it is also a valid way to solve it so we do not need to delete it. It is always good to keep other ways of solving a problem, but the first solution in the file should always be the one following the video. And use of commenting to avoid any confusion,

I would suggest that you edit the file to add yours while keeping the other solution. You can put yours first (Since it is the one following the video solution) and put the other solution below. They should be separated in two Solution classes, should look something like this:

// Your solution here, bellman-ford....
class Solution {
    int findCheapestPrice() {
        // ...
    }
}

// Other solution here, dijkstras....
class Solution {
    int findCheapestPrice() {
        // ...
    }
}

@adityaiiitr
Copy link
Contributor Author

Thanks @a93a for the review I had done the necessary code changes.

@a93a a93a merged commit 04d4418 into neetcode-gh:main Feb 6, 2024
@a93a
Copy link
Collaborator

a93a commented Feb 6, 2024

Thank you @adityaiiitr ! I have merged this now.

@a93a
Copy link
Collaborator

a93a commented Feb 6, 2024

@adityaiiitr Please feel free to create seperate PR for each Leetcode problem in the future, this makes it easier to read & review 😃

@adityaiiitr adityaiiitr deleted the adityacpp branch February 8, 2024 13:15
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.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy