kanak22 / CP-DSA-Questions

This is a repository entirely dedicated to all kind of questions ranging from basic DSA to CP. It aims to provide a solution to different questions. 📚
73 stars 128 forks source link

Samarth updated peakelement #577

Closed Sxmxrth closed 2 years ago

Sxmxrth commented 2 years ago

Related Issue

Closes: #[issue number that will be closed through this PR]

Updated the equation to find mid.

changed the equation mid=(s+e)/2 to mid=s+(e-s)/2

Mention any unusual behavior of your code (Write NA if not)

N/A

Checklist:

(To mark, write x inside the square brackets like this: [x])

Additional Info (optional)

Now equation of mid is more robust.

kanak22 commented 2 years ago

Hello @Sxmxrth this PR is linked with which issue?

Sxmxrth commented 2 years ago

It's not, I just wanted to optimize it more.