본문 바로가기

분류 전체보기

(83)
[2] 이미지관련? 1. 스마트폰 카메라 해상도? 아이폰 13 Pro : 12M MegapixelsBest Print Quality 300ppiPixel Resolution12MP8" x 12"4247 x 282616MP10" x 15"4904 x 326318MP12" x 18"5201 x 346120MP12" x 18"5483 x 3648A megapixel means one million pixels. The resolution of digital cameras and camera phones is often measured in megapixels. For example, a 12-megapixel camera can produce images with 12 million total pixels. 2. 왜 사진에는 J..
[1] 프로세스 스레드차이, 문맥전환에 소요되는 시간 #1  프로세스와 스레드 차이  프로세스란 ? 프로세스는 실행되고 있는 프로그램의 인스턴스*이다. 1)  독립적 개체이다     - 프로세스는 cpu시간이나 메모리등의 시스템 자원이 할당되는 독립적인 개체이다.      - 할당되는 메모리 주소가 다르고, 한 프로세스는 다른 프로세스의 변수나 자료구에 접근할 수 없다.         프로세스간 통신(데이터 공유)를 위해서는 파이프, 파일, 소켓등의 방법이 있다.                                                                *인스턴스 : 객체 지향 프로그래밍에서 인스턴스는 해당 클래스의 구조로 컴퓨터 저장공간에서 할당된 실체 스레드란 ? 1) 스레드는 프로세스 안에 존재하며, 프로세스의 자원을 공유한다. ..
[c++] 128. Longest Consecutive Sequence 128. Longest Consecutive Sequence Given an unsorted array of integers nums, return the length of the longest consecutive elements sequence. You must write an algorithm that runs in O(n) time. 한줄해석 : 배열내에서 연속적인 원소의 최대 길이를 찾아 반환하라 Example 1: Input: nums = [100,4,200,1,3,2] Output: 4 Explanation: The longest consecutive elements sequence is [1, 2, 3, 4]. Therefore its length is 4. Example 2: Input:..
[LeetCode Curated Algo 170] 253. Meeting Rooms II 문제 253. Meeting Rooms II Given an array of meeting time intervals intervals where intervals[i] = [starti, endi], return the minimum number of conference rooms required. 한줄해석 : 회의의 시작시간, 종료시간 리스트를 입력으로 받아, 회의실이 총 몇개가 필요한지 구하라. Example 1: Input: intervals = [[0,30],[5,10],[15,20]] Output: 2 Example 2: Input: intervals = [[7,10],[2,4]] Output: 1 Constraints: 1
[Leetcode Algorithm I, Day2] [leetcode 283, leetcode 167 ][c++] 한줄평 : 와 오늘문제는 짧지만 아주 뇌를 자극해준다. HINT! 더보기 two pointer 283. Move Zeroes Given an integer array nums, move all 0's to the end of it while maintaining the relative order of the non-zero elements. Note that you must do this in-place without making a copy of the array. 한줄해석 : 0을 뒤로 옮기되, 숫자 배열을 바꾸지마라. Example 1: Input: nums = [0,1,0,3,12] Output: [1,3,12,0,0] Example 2: Input: nums = [0] Output: [0] Co..
[leetcode 35][c++] search Insert Position 문제 : 알고있어야 할 점. "return low" 한다. 그 이유는. 배열에 [1,5] 가 들어있을경우, high = low +1 이고, mid = low 이다. 이걸 아래와 같이 나눠서 생각하면 각 변수의 인덱스는 l = 0, h = 1, m = 0 이다. case 1) target = 0 이면, target nums[mid] 면, low=mid+1 이므로, 1회 진행시 h,l,m이 같은 값을 가르킨다. [1, 5] ↑↑↑ h l m 다시 target이 5보다 작으므로, h=mid-1이고 [1, 5] ↑ ↑ h l 이 된다. case 3) ..
leetcode 56. merge-intervals [c++] [point :이차원벡터 정렬] leetcode 56. merge-intervals 해설 원본 문제 : 더보기 더보기 Given an array of intervals where intervals[i] = [starti, endi], merge all overlapping intervals, and return an array of the non-overlapping intervals that cover all the intervals in the input. 문제해석요약 : 아래처럼 범위가 겹쳐지는게 있으면 합쳐서 하나로 만들어라 Input: intervals = [[1,3],[2,6],[8,10],[15,18]] Output: [[1,6],[8,10],[15,18]] Explanation: Since intervals [1,3] a..
Gstreamer Memory monit with valgrind https://snapcraft.io/install/valgrind/centos Install valgrind on CentOS using the Snap Store | Snapcraft Get the latest version of valgrind for on CentOS - A programming tool for memory debugging, leak detection, and profiling snapcraft.io 1. valgrin 설치 방법 2 . gstreamer 를 사용할 때, supp 를 넣어줘야 오탐을 방지할 수 있다. 외부라이브러리 라서 glib으로 잡을경우 대량의 오탐이 발생한다.! 다음 링크는 ubuntu 에서 valgrind로 gstreamer 변화를 관찰하는데 유용하다. 더..