본문 바로가기
728x90
mac m1 .rar 압축 파일 열기 app store에서 The Unarchiver를 다운로드한다. 무료다!! 설치가 완료되면 .rar 파일을 더블 클릭한다. 그러면 압축 풀기 완료!! 2022. 1. 20.
leetcode 849) Maximize Distance to Closest Person LV. Medium 🧐 https://leetcode.com/problems/maximize-distance-to-closest-person/ Maximize Distance to Closest Person - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제 You are given an array representing a row of seats where seats[i] = 1 represents a person sitting in the ith seat.. 2022. 1. 19.
leetcode 142) Linked List Cycle II LV. Medium 🧐 https://leetcode.com/problems/linked-list-cycle-ii/ Linked List Cycle II - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제 Given the head of a linked list, return the node where the cycle begins. If there is no cycle, return null. There is a cycle in a linked list i.. 2022. 1. 19.
PlatformIO Library 추가하기 VSCode - PlatformIO로 아두이노 프로젝트를 진행하는 중 CAN 통신과 OBD2 헤더가 없어서 에러가 났다!!! 보통은 Arduino IDE처럼 library에 들어가 헤더를 검색해 다운을 받으면 되지만 CAN를 검색해도 안 나옴! (Platform IDE - HOME - 왼쪽 Libraries로 들어가면 헤더 검색 가능) PlatformIO Registry에 들어가서 라이브러리를 다운받았다 https://registry.platformio.org/ PlatformIO Registry The world's first package and project dependency management solution for embedded development registry.platformio.org.. 2022. 1. 19.
CPP Enum(enumerate) Enum이란? 열거형, enumerate에서 나온 키워드다. enum를 통해 자기만의 자료형을 만들 수 있다 = 사용자 정의 자료형 아래와 같이 enum은 열거자를 가지는데, 열거자는 ;이 아니라 ,로 구분된다. enum DayWeak { MON, TUE, WEN, THU, FRI, SAT, SUN }; enum을 정의 시에는 메모리가 할당되지 않고, 열거된 유형의 변수가 정의된 경우에 변수에 대해 메모리가 할당된다. 열거자 대체로 모두 대문자로 이름을 짓는다. 열거자는 enum와 같은 네임스페이스에 배치되므로, 열거자 이름은 같은 네임스페이스 내의 여러 enum에서 사용할 수 없다. 밑의 예제를 보자. enum dayWeak { MON }; enum classDay { MON 2022. 1. 19.
leetcode 290) Word Pattern LV. Easy 😎 https://leetcode.com/problems/word-pattern/ Word Pattern - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제 Given a pattern and a string s, find if s follows the same pattern. Here follow means a full match, such that there is a bijection between a letter in pattern an.. 2022. 1. 18.
leetcode 605) Can Place Flowers LV. Easy 😎 https://leetcode.com/problems/can-place-flowers/ Can Place Flowers - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제 You have a long flowerbed in which some of the plots are planted, and some are not. However, flowers cannot be planted in adjacent plots. Given an inte.. 2022. 1. 18.
leetcode 1345) Jump Game IV LV. Hard 🥵 https://leetcode.com/problems/jump-game-iv/ Jump Game IV - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제 Given an array of integers arr, you are initially positioned at the first index of the array. In one step you can jump from index i to index: i + 1 where: i + 1 .. 2022. 1. 18.
CPP STL 맵(Map) 맵(Map)이란? 각 노드가 key와 value 쌍으로 이루어진 정렬이 되어 있는 트리 에 있다. 중복을 허용하지 않는다. map m; ex) map m; first, second가 있는 pair 객체로 저장된다. first = key, second = value map의 내부 구현은 검색, 삽입, 삭제가 O(logn)이다. 맵 정렬 자료를 저장할 때 내부에서 자동으로 정렬한다. key를 기준으로 오름차순으로 정렬한다. 내림차순으로 정렬하고 싶으면 value 뒤에 greater를 넣어주면 된다. map m; 맵은 컨테이너이므로 iterator를 사용해서 데이터를 찾는다. 2022. 1. 18.
CPP 정적 바인딩(Static Binding)과 동적 바인딩(Dynamic Binding) 바인딩(Binding)이란? 프로그램에 사용된 각종 내부 요소, 이름 식별자들에 대해 값 또는 속성이 결정되는 과정 "int a = 4;"에서 a의 데이터 타입이 int형이라고 정하는 것을 말한다. 정적 바인딩(Static Binding)이란? 컴파일 시점에 결정되는 바인딩을 정적 바인딩이라고 함! 소스상에 명시적으로 타입과, 그 타입의 변수명을 선언하는 것 장점 - 컴파일 시 타입에 대한 정보가 결정되기 때문에 실행 속도가 빠름 - 타입 에러로 인한 문제를 초기에 발견할 수 있어 안정성 ⬆ 단점 - 컴파일 시 결정이 되고 그 이후로는 변경이 불가능 동적 바인딩(Dynamic Binding)이란? 런타임 시점에 이루어지는 바인딩 과정을 동적 바인딩이라고 함! CPP에서 가상 함수 오버라이딩이 동적 바인딩.. 2022. 1. 18.
728x90