분류 전체보기
-
[개념] BigO 표기법알고리즘 2023. 11. 6. 22:55
빅오표기법이란? 우리는 알고리즘 문제를 풀던 코드를 짜던 무엇이 가장 효율적인지 시간상 짧게 걸리는지를 확인 할 필요가 있다. ( 성능과 직접적으로 연결되는 부분이기 때문 ) 빅오표기법 상수시간 알고리즘(Constant Time Algorithm) - 가장 이상적인 알고리즘으로써 실행되는 횟수가 상수값으로 나타나서 그 횟수만큼만 실행을 하기때문에 Input되는 데이터가 어떻든 같은 시간안에 처리하게 된다. const array = [1, 2, 3, 4, 5] const fnc = (array) => { console.log(array[0]) } 만약 아래 코드와 같이 출력하는 값이 여러개로 늘어난다하더라도 상수는 제외하고 나타내기 때문에 결국은 O(1)으로 표기된다. const array = [1, 2,..
-
[Careerthon] 컴퓨터시스템의 발전으로 본 스레드와 프로세스카테고리 없음 2023. 11. 6. 15:24
개요 주요 용어정리 컴퓨터시스템의 발전 정리와 비유 멀티스레드와 프로세스의 차이 주요 용어정리 프로그램 컴퓨터가 실행할 수 있는 명령어의 집합 프로세스 컴퓨터에서 실제 실행 중인 프로그램 각각의 프로세스는 독립된 메모리 공간을 할당받는다 메인메모리 프로세스가 여기서 대기중임 IO 네트워크의 어딘가와 데이터를 주고 받는 것 입출력장치랑 주고 받음 컴퓨터시스템의 발전 단일프로세스시스템 초창기버전임 한번에 하나의 프로그램만 실행됨 CPU사용률이 좋지 않다는 단점이 있음 단일프로세스의 실행모습 실행중에 있는 프로세스가 io작업간에는 아무작업도 안하고 놀고 있음 (중간중간 빈 시간이 있다) 해결책 : 멀티프로그래밍 멀티프로세스 ( 멀티프로그래밍 ) 여러개의 프로그램을 메모리에 올려두고 동시에 실행시키자 io작업이..
-
[Careerthon] 운영 체제 및 컴퓨터의 구조네트워크/CS Study 2023. 11. 6. 14:19
개요 알아야하는 이유 컴퓨터의 구조 운영체제 컴퓨터 구조를 알아야 하는 이유 개발자는 코드만 잘 짜면 되는 것 아닌가??? => 아니다 이자식아 언어의 문법 및 기술스택을 늘리는 것 뿐만아니라 컴퓨터의 근간을 알아야 한다. 왜? 알게된다면 문제 해결 능력과 성능, 용량, 비용을 고려한 프로그래밍이 가능해진다. 문제해결능력 분명 동일한 코드를 작성을 했는데도 불구하고 실행이 되지않는 사람도 있다. 그럼 뭐가 문제일까? 개발환경에서 문제가 없었는데 사용자의 환경(컴퓨터환경)에서 문제가 발생하는 경우가 있을 수 있다. 이럴 때에는 문법만을 알고 있는경우에는 해법을 찾지 못한다. 하지만 운영체제를 알고 있다면 좀 다른 부분에서 문제에 대한 고민을 할 수있다. 내가 입력한 코드 외에 여러방면에서 문제를 해결할 수..
-
[개념] 검색알고리즘 (선형 VS 이진)알고리즘 2023. 11. 4. 11:44
검색 알고리즘 우리는 프로젝트를 하던 알고리즘 문제를 풀던 어떠한 값을 찾기위해서 배열 또는 객체를 만들어서 그 값을 찾는 로직을 구현을 하는 모습을 자주 보인다. 그렇다면 이러한 검색을 하기위해서 가장 최적의 방법은 무엇일까? 에 대한 고민을 한번쯤은 해봐야 한다. 선형검색 알고리즘(linear search) 아래 이미지는 선형검색 알고리즘의 실행 과정을 보여준다. 선형검색 알고리즘은 0번째 index부터의 비교를 통해서 값을 찾을 수 있다 장점 값을 추가할 때 강점이 있음 간단하고 직관적인 코드 (걍 반복문 돌리면 됨) 단점 크기가 커질수록 step이 비례적으로 증가하기때문에 점진적으로 비효율적으로 되어버림 최악의수로는 배열의 마지막 index에 위치한 값을 찾는 것이다. function linear..