The study of data structures is one of efficiency. Given a particular amount of data, what is the best way to store it to achieve a particular goal?

As a programmer, you regularly use a variety of collection types, such as arrays, dictionaries and sets. These are data structures that hold a collection of data, each structure having its own performance characteristics.

As an example, consider the difference between an array and a set. Both are meant to hold a collection of elements, but searching for an element in an array takes far longer than searching for an element in a set. On the other hand, you can order the elements of an array but you can’t order the elements of a set.

Data structures are a well-studied discipline, and the concepts are language agnostic; A data structure from C is functionally and conceptually identical to the same data structure in any other language, such as Swift. At the same time, the high-level expressiveness of Swift makes it an ideal choice for learning these core concepts without sacrificing too much performance.

Algorithms on the other hand are a set of operations that complete a task. This can be a sorting algorithm that moves data around to put it in order. Or it can be an algorithm that compresses an 8K picture to a manageable size. Algorithms are essential to software and many have been created to act as building blocks for useful programs.

So why should you learn data structures and algorithms?

데이터 구조에 대한 연구는 효율성의 하나이다. 특정한 양의 데이터를 고려할 때, 특정한 목표를 달성하기 위해 데이터를 저장하는 가장 좋은 방법은 무엇인가?

프로그래머로서 당신은 배열, 사전, 세트와 같은 다양한 수집 유형을 정기적으로 사용한다. 이것들은 데이터 모음을 보유하는 데이터 구조로서, 각각의 구조는 고유의 성능 특성을 가지고 있다.

예를 들어 배열과 집합의 차이를 고려하십시오. 둘 다 요소 집합을 보유하도록 되어 있지만 배열에서 요소를 검색하는 것은 집합에서 요소를 검색하는 것보다 훨씬 더 오래 걸린다. 반면에 배열의 요소를 정렬할 수는 있지만 집합의 요소를 정렬할 수는 없다.

데이터 구조는 잘 연구된 분야로 개념들은 언어 불가지론이다. C의 데이터 구조는 기능적으로 그리고 개념적으로 스위프트와 같은 다른 언어의 동일한 데이터 구조와 동일하다. 동시에, 스위프트의 높은 수준의 표현력은 이러한 핵심 개념을 너무 많은 성과를 희생하지 않고 배우기에 이상적인 선택으로 만든다.

반면에 알고리즘은 과제를 완료하는 일련의 작업이다. 이것은 데이터를 이동시켜 순서대로 배열하는 정렬 알고리즘이 될 수 있다. 또는 8K 사진을 관리 가능한 크기로 압축하는 알고리즘이 될 수 있다. 알고리즘은 소프트웨어에 필수적이며 많은 알고리즘이 유용한 프로그램의 구성 요소 역할을 하기 위해 만들어졌다.

그렇다면 왜 당신은 데이터 구조와 알고리즘을 배워야 하는가?

Interviews

An important reason to keep your algorithmic skills up to par is to prepare for interviews. Most companies have at least one or two algorithmic questions to test your abilities as an engineer. Having a strong foundation in data structures and algorithms is the “bar” for many software engineering positions.

당신의 알고리즘 기술을 최신 수준으로 유지하는 중요한 이유는 면접을 준비하기 위함이다. 대부분의 회사는 기술자로서 당신의 능력을 테스트하기 위해 최소한 한두 개의 알고리즘 질문을 가지고 있다. 데이터 구조와 알고리즘에 강한 기반을 갖는 것은 많은 소프트웨어 공학 분야의 "bar"이다.

Work

Using an appropriate data structure is crucial when working with lots of data. Using the right algorithm plays a significant role in the performance and scalability of your software. Your mobile apps will be more responsive and have better battery life. Your server apps will be able to handle more concurrent requests and use less energy. Algorithms often include proofs of correctness that you can leverage to build better software.