Skip to Content
자바로 배우는 핵심 자료구조와 알고리즘: 기술 면접에 필요한 실용주의 자료구조와 알고리즘
book

자바로 배우는 핵심 자료구조와 알고리즘: 기술 면접에 필요한 실용주의 자료구조와 알고리즘

by 유동환, 앨런 B. 다우니
June 2018
Beginner to intermediate
184 pages
3h 30m
Korean
Hanbit Media, Inc.
Content preview from 자바로 배우는 핵심 자료구조와 알고리즘: 기술 면접에 필요한 실용주의 자료구조와 알고리즘
55
5
이중 연결 리스트
이 장에서는 앞 장의 실습 결과를 살펴보고
List
인터페이스를 구현하는 또 다른 클래스인 이
중 연결 리스트
doubly
linked
list
에 대해 알아봅니다.
5.1
성능 프로파일 결과
앞 장의 실습에서
Profiler.java
파일로 다양한
ArrayList
LinkedList
자료구조의 연
산을 문제 크기별로 실행해 보았습니다. 그리고
log
-
log
스케일로 문제 크기 대비 실행시간의
그래프를 그리고 결과 곡선의 기울기를 추정하였습니다. 추정 기울기는 문제 크기와 실행시간
사이 관계의 지수 앞자리를 의미합니다.
예를 들어,
ArrayList
의 끝에 요소를 더하는
add
메서드를 사용하였을 때
n
번 추가 연산의 전
체 시간은
n
에 비례하였습니다. 즉, 추정 기울기는
1
에 가까웠습니다. 결국,
n
번 추가 연산은
O
(
n
)으로 결론지었습니다. 따라서 개별
add
메서드의 평균 시간은 상수 시간 또는
O
(
1
)이
고, 이것은 알고리즘 분석을 기반으로 예상한 내용과 일치합니다.
이 실습은
profileArrayListAddBeginning
메서드를 작성하여
ArrayList
의 시작에 새로운
요소를 추가하는 연산의 성능을 테스트합니다. 앞의 분석에 근거하여 각
add
메서드는 선형이
어야 합니다. 이는 다른 요소들을 오른쪽으로 시프트하기 ...
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

자바 마이크로서비스를 활용한 SRE : 기업에서 신뢰할 수 있는 마이크로서비스를 위한 패턴

자바 마이크로서비스를 활용한 SRE : 기업에서 신뢰할 수 있는 마이크로서비스를 위한 패턴

조너선 슈나이더

Publisher Resources

ISBN: 9791162240847