Skip to content

study(0122): faster runtimes [buy/sell stock II] #3

@massivebird

Description

@massivebird

Challenge

My current 0122 solution (natty) beats 91.89% in memory, but the runtime is incredibly slow. I'm not beating anyone in speed.

I like my solution! I derived it from a working dynamic programming approach that failed the memory constraints. I flattened the $nxn$ matrix into an $n$-length array. Super duper cool 🦖

Metadata

Metadata

Assignees

No one assigned

    Labels

    studyStudying how optimized solutions work.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions