Skip to content

Latest commit

 

History

History
8 lines (8 loc) · 665 Bytes

ListMinAbsDiff.md

File metadata and controls

8 lines (8 loc) · 665 Bytes

Link

https://leetcode.com/problems/minimum-absolute-difference/

Motivation

This problem echoes real-life programming goals. We have a collection of data (arr), and we want to determine some not-obvious property (the minimum absolute difference), and find all pieces of data that meet that property (all pairs that can make that min-abs-diff). Of course this particular property and this particular array likely won't come up in real-life, but the overall structure is definitely something that will come up. So this is a perfectly good exercise problem. It also lends itself to thinking about sub-problems and how to break down the problem into smaller chunks.