목록2023/11/04 (2)
넘치게 채우기
이 장에서는 세 가지 패러다임인 구조적 프로그래밍(structured programming) 객체지향 프로그래밍(object-oriented programming) 함수형 프로그래밍(functional programming) 에 대해 설명한다. 구조적 프로그래밍 최초로 적용된 패러다임은 구조적 프로그래밍으로, 1968년 에츠허르 비버 데이크스트라(Edsger Wybve Dijkstra)가 발견했다. 데이크스트라는 무분별한 점프(goto문장)는 프로그램 구조에 해롭다는 사실을 제시했다. 데이크스트라는 이러한 점프들을 if/then/else 와 do/while/until과 같이 더 익숙한 구조로 대체했다. 구조적 프로그래밍은 다음과 같이 요약할 수 있다: “구조적 프로그래밍은 제어흐름의 직접적인 전환에 대해..
https://leetcode.com/problems/last-moment-before-all-ants-fall-out-of-a-plank/description/ Last Moment Before All Ants Fall Out of a Plank - LeetCode Can you solve this real interview question? Last Moment Before All Ants Fall Out of a Plank - We have a wooden plank of the length n units. Some ants are walking on the plank, each ant moves with a speed of 1 unit per second. Some of the ants move ..