Mohd Ismaeel’s Post

Stop writing code that “just works.” Day 45 / 100 Days of DSA Problem: Find a pair from two arrays whose sum is closest to a target. First approach: Nested loops. Better approach: Two pointers (since arrays are sorted). Move intelligently based on the sum. Time Complexity: O(n + m). Same answer. Smarter thinking. Day 45 lesson: Don’t stop at “it works.” Push for optimal. #Day45 #100DaysOfCode #DSA #Java #ProblemSolving

  • No alternative text description for this image

To view or add a comment, sign in

Explore content categories