[閒聊] 3sums Closest

作者: SuicidePeko (string int = true;)   2021-11-28 12:50:30
Given an integer array nums of length n and an integer target, find three
integers in nums such that the sum is closest to target.
Return the sum of the three integers.
You may assume that each input would have exactly one solution.
請問這題怎麼解==
想好久 只想得出n^3的白痴答案
好苦
作者: MurasakiSion (紫咲シオン)   2021-11-28 13:48:00
直接看裡面的討論啊= =

Links booklink

Contact Us: admin [ a t ] ucptt.com