Skip to content

Incorrect pattern for #121 (Best Time to Buy and Sell Stock) #266

@edobrynin-dodo

Description

@edobrynin-dodo

Hi there!

I found the problem 121 (Best Time to Buy and Sell Stock) in "Sliding Window" section on neetcode.io

But in the video author is using "Two Pointers" pattern for his solution, not "Sliding Window".
So I believe this task should be moved to "Two Pointers" section.
I spent couple of hours trying to solve it with "Sliding Window" before I gave up, watched the video solution and found that we need another pattern here :(

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions