Skip to Content
똑똑한 코드 작성을 위한 실전 알고리즘
book

똑똑한 코드 작성을 위한 실전 알고리즘

by 조지 하이네만, 윤대석
May 2022
Beginner to intermediate
296 pages
5h 54m
Korean
Hanbit Media, Inc.
Content preview from 똑똑한 코드 작성을 위한 실전 알고리즘
43
1
문제 해결
알고리즘을 평가할 때는
공간
복잡도
space
complexity
도 고려해야 한다. 공간 복잡도는 문제 인스턴
스의 크기
N
에 기반해 알고리즘에 필요한 추가 메모리 공간을 나타낸다.
메모리
는 컴퓨터의 램
RAM
혹은 파일 시스템에 저장되는 데이터의 일반적인 용어다.
largest
_
two
()
는 최소 공간 요
구 사항을 가지며 두 변수
my
_
max
second
및 반복자 변수
idx
를 사용한다. 문제 인스턴스
의 크기와 상관없이 추가 공간은 변하지 않는다. 이는 공간 복잡도가 문제 인스턴스에 독립적
이거나 상수라는 의미다.
mutable
_
two
()
는 비슷한 동작을 보인다. 대조적으로
tournament
_
two
()
winner
,
loser
,
prior
라는
3
개 배열을 할당하며 이 배열들은 크기가
N
-
1
이다. 총
추가 공간은
N
이 증가함에 따라 문제 인스턴스의 크기에 정비례
3
하는 방식으로 증가한다. 토
너먼트 구조를 구성하면
largest
_
two
()
와 비교할 때
tournament
_
two
()
가 느려지게 된다.
double
_
two
()
sorting
_
two
()
는 입력
A
의 복사본을 만드는데, 이는 알고리즘이 저장 공간
largest
_
two
()
보다는
tournament
_
two
()
와 같이 사용한다는 의미다. 이 책 전반에서 각
알고리즘의 시간 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

데이터 익명화를 위한 파이프라인

데이터 익명화를 위한 파이프라인

루크 아버클, 칼리드 엘 에맘
개발 7년차, 매니저 1일차

개발 7년차, 매니저 1일차

권원상, 한민주, 카미유 푸르니에

Publisher Resources

ISBN: 9791162245644