divide and conquer

그린그레이프·2020년 6월 8일

algorithms simplified

목록 보기
1/1

base case

the simplest case I can think of

recursive case

reduce the size of problem on each step

example

find the largest square that can fill 1440 x 960

abstraction: rectangular
base(simplest): 1:2(height : width)
recursive: remove the squares with short side length as many as possible

example application

1440 x 960 -> 480 x 960
answer: 480

profile
제대로 걷는 한걸음이 곧 백걸음이다

0개의 댓글