This repository consists of the code samples, assignments, and notes for the Java data structures & algorithms + interview preparation bootcamp of WeMakeDevs.
I have tried the brute force appraoch (i.e. running the loop from start upto target and end upto target). Actually this bruteforce approach is much efficient than the binary search approach.
The bruteforce approach takes 55 ms to run and consumes 42.2 MB of ram,
while The binarysearch approach takes 73 ms to run and consumes 44.6 MB of ram
I have added few screenshots which shows the same please check it.
I have tried the brute force appraoch (i.e. running the loop from start upto target and end upto target). Actually this bruteforce approach is much efficient than the binary search approach. The bruteforce approach takes 55 ms to run and consumes 42.2 MB of ram, while The binarysearch approach takes 73 ms to run and consumes 44.6 MB of ram I have added few screenshots which shows the same please check it.