Eat Study Love

먹고 공부하고 사랑하라

파이썬 공부 10

Determine the Minimum Sum of a k-avoiding Array[M,Math,Greedy]

https://leetcode.com/problems/determine-the-minimum-sum-of-a-k-avoiding-array/description/You are given two integers, n and k.An array of distinct positive integers is called a k-avoiding array if there does not exist any pair of distinct elements that sum to k.Return the minimum possible sum of a k-avoiding array of length n. Example 1:Input: n = 5, k = 4Output: 18Explanation: Consider the k-av..

Coding_Practice 2024.07.22

Review 10 - 각종 Tree / Graph Traversals in Python

https://eglife.tistory.com/78 Review 9 - Queues & Stackshttps://eglife.tistory.com/77 Review 8 - Python Data Structurehttps://eglife.tistory.com/75 Review 7 - Python Algorithm design & Testing & Debugginghttps://eglife.tistory.com/74 Review 6 - Python Recursion & Merge Sorthttps://eglife.tistory.com/73 Revieglife.tistory.com끝을 향해 달려가는 Python Review 사실상 이 Chapter에서 다룰 내용을 다루기 위해 지금껏 복습해왔다고 해도 과언이..

SW 만학도/Python 2024.07.09

Review 1 - Python programming basics

프로그래밍은 안 쓰다 보면 까먹는다. 더군다나 전공자가 아니면 정말 1~2주만 정신 놓고 있다가 복귀했을 때 굉장히 기초적인 코딩도 손에 잡히지 않는 것을 쉽게 체감할 수 있다. 그리하야 시작된 Review 프로젝트 Review인 만큼 전반적으로 개념을 빠르게 복기하고, 실습에 시간을 좀 더 할애해보자! 1. Abstraction 우리는 코딩을 할 때, HW 구조를 알 필요가 없다. ex) 마우스 벤더, HDD용량, 컴퓨터 벤더 등.. 그 이유는 OS(widows, Linux, MacOS)라는 것이 HW와 SW를 이어주는 매개체 역할을 해주어 Interface 와 Implementation 영역을 나누어 주기 때문이다. 그러나 우리에겐 OS라는 것도 너무 Low Level의 영역이라 OS를 이해하고 코딩..

SW 만학도/Python 2024.07.01

13. Data Structures (Trees)

https://eglife.tistory.com/38 12. Data Structures ( Stacks & Queues ) https://eglife.tistory.com/30 11. Data Structures ( Arrays & Linked Lists ) 본격적인 자료구조에 대한 공부! Python에서 list를 겁~나게 다뤘는데, 사실 이 List는 고마운 친구였다는 것이다. 그 고마운 List의 내부구조 eglife.tistory.com 슬 복잡해지는 자료구조 지금껏 배웠던 자료구조는 Linear하다면 이제는 non-Linear한 Case도 슬슬 나온다. Tree의 정의 - Tree / Subtree의 Recursive한 구조이다. - Node = Vertex = 꼭지 - Root : Paret..

SW 만학도/Python 2024.03.25

12. Data Structures ( Stacks & Queues )

https://eglife.tistory.com/30 11. Data Structures ( Arrays & Linked Lists ) 본격적인 자료구조에 대한 공부! Python에서 list를 겁~나게 다뤘는데, 사실 이 List는 고마운 친구였다는 것이다. 그 고마운 List의 내부구조를 톺아보자 ㅠㅠ List가 [1,2,3,4,5] 만 있던 메모리 공간이 eglife.tistory.com Data의 또 다른 구조인 Stack 과 Queue에 대해 알아보는 시간! Stack - ex) 식판 쌓고 가져가기 --> Las it First out , 키보드에서 Back Space --> 마지막에 쓴 문자를 지운다. - ex) 프로그래밍에서 괄호를 쌓기 --> 괄호 열 때마다 Stack 쌓고 닫을 때마다 S..

SW 만학도/Python 2024.03.25