kunal-kushwaha / DSA-Bootcamp-Java

This repository consists of the code samples, assignments, and notes for the Java data structures & algorithms + interview preparation bootcamp of WeMakeDevs.

Home Page:https://www.youtube.com/playlist?list=PL9gnSGHSqcnr_DxHsP7AW9ftq0AtAyYqJ

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Regarding code for Pattern 31

aishwarypandey30 opened this issue · comments

https://github.com/kunal-kushwaha/DSA-Bootcamp-Java/blob/325361dd2e9ab2d50bc7d2eeefada97d3d9db0d0/lectures/13-patterns/code/src/com/kunal/Main.java#L8C22-L8C22

Hello,
I am writing this to let u know that the code for pattern 31 is slightly wrong
when you are taking n=2n; the loop is running more times than it should
just change the code n=2
(n-1) the code would be correct.

Please kindly see to it. And let me know If I am wrong.

Thank you