Code Monkey home page Code Monkey logo

datastructures's People

Contributors

juicemia avatar lbijaminas avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

datastructures's Issues

Regarding the proof

"Wouldn't these two only be true if the array has exactly two elements?
Also that would mean that the second one is exactly the same as the
first one."

I think you're confusing the max with the peak. Where you asked the question, that is just a definition of a peak. Max is the largest element, whereas the peak is the largest element in the neighborhood. So if it's somewhere in the middle it has to be larger than both of its neighbors. If it's at the edges of the array, it will be if it's larger than the only neighbor it has.

Anyway, I wrote much simple proof. I was overthinking big time writing this one. Once you'll pull the files, take a look.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.