Eat Study Love

먹고 공부하고 사랑하라

MAIN ISSUE

more

C Struct 연습

첨부파일의 코드에는 필자가 직접 연습한 것과 약간의 낙서(?)가 가미되어 있다ㅎㅎ   C에는 Python / C++의 Class와 유사하게 Struct라는 구조가 있다. 이 Struct는 Array보단 고차원의 구조로, 각 종 data type 또는 다른 Sturct type의 Variable을 member로 가질 수 있다. 하지만, fucntion을 Member 변수로 갖지 못하고 Class 상속 / Polymorphism, Instance Construct/Destruct 등 객체지향프로그래밍 즉 Oriented Object Programming을 실행하기엔 부족함이 많다. 그래도 보수적인 C Programming 영역에서 가장 고차원적인 구조이기에 연습이 필요하다. Q1.  첫 번째론 좌표평면 상에..

C 2024.08.22 0

C programming file I/O 연습

사실 FILE I/O의 경우엔 코딩 공부를 할 때 잘 까먹기 쉽다. 왜냐하면, file I/O 할 때가 아니면 평소에 쓸 일이 없는 문법이 많기 때문이다. 그래서 종종 Remind 차원에서 file I/O를 건드려줘야 기억에 오래 남는다. 물론 그 때 그 때 인터넷 검색해서 실행해도 충분히 코딩을 할 수 있지만, 그래도 명색이 프로그래밍 공부를 하는 사람이라면 이 정도는 능숙하게 처리할 수 있어야 멋지다. 첨부된 파일에선 여러 가지 scanf + file I/O 연습을 할 수 있다. 주석처리한 부분은 나만의 낙서장(?)으로 사용된 것이라 삭제하고 코딩을 진행하면 된다. Q1.scanf 연습하는 문제다.12-hour 시간을 user로부터 입력받아 24-hour 시간으로 return해주는 코드를 짜는 것! ..

C 2024.08.21 0

Review 11 - Dynamic Programming

https://eglife.tistory.com/123 Review 10 - Single-Source-Shortest Path in C++https://eglife.tistory.com/103 Review 9 - MST(Minimum Spanning Trees) in C++https://eglife.tistory.com/98 [Algorithm] Review 8 - Priority Queues and Heaps in C++https://eglife.tistory.com/92 [Main course!] Review 7 - Inheritance in C++https://eglife.tiseglife.tistory.com 프로그래밍 최악의 손님 DP다. 재귀적으로 진행되는 코딩은 솔루션을 펼쳐놓고 봐도 뭔 소..

C++ 2024.08.03 0

Review 10 - Single-Source-Shortest Path in C++

https://eglife.tistory.com/103 Review 9 - MST(Minimum Spanning Trees) in C++https://eglife.tistory.com/98 [Algorithm] Review 8 - Priority Queues and Heaps in C++https://eglife.tistory.com/92 [Main course!] Review 7 - Inheritance in C++https://eglife.tistory.com/89 Review 5 - Special Members in C++https://eglife.tistory.com/88 eglife.tistory.comGraph의 path와 관련된 알고리즘이다. 특정 노드에서 출발하는 가장 짧은 path를 찾는..

C++ 2024.08.02 0

Review 9 - MST(Minimum Spanning Trees) in C++

https://eglife.tistory.com/98 [Algorithm] Review 8 - Priority Queues and Heaps in C++https://eglife.tistory.com/92 [Main course!] Review 7 - Inheritance in C++https://eglife.tistory.com/89 Review 5 - Special Members in C++https://eglife.tistory.com/88 Review 4 - Class,Overloading,Special Members in C++https://eglife.tistory.com/87 Revieglife.tistory.com본격적으로 알고리즘의 세계에 발을 디뎠다.  1. Graph 이 장을 포함해,..

C++ 2024.07.24 8

Search a 2D Matrix II[M,Array,Binary Search,Divide and Conquer,Matrix]

https://leetcode.com/problems/search-a-2d-matrix-ii/description/Write an efficient algorithm that searches for a value target in an m x n integer matrix matrix. This matrix has the following properties:Integers in each row are sorted in ascending from left to right.Integers in each column are sorted in ascending from top to bottom. Example 1:Input: matrix = [[1,4,7,11,15],[2,5,8,12,19],[3,6,9,16..

Coding_Practice 2024.10.16 0

MinMaxDivision(Divide array A into K blocks and minimize the largest sum of any block)

https://app.codility.com/programmers/lessons/14-binary_search_algorithm/min_max_division/ MinMaxDivision coding task - Learn to Code - CodilityDivide array A into K blocks and minimize the largest sum of any block.app.codility.comYou are given integers K, M and a non-empty array A consisting of N integers. Every element of the array is not greater than M.You should divide this array into K block..

Coding_Practice 2024.10.16 1