Eat Study Love

먹고 공부하고 사랑하라

코딩독학 19

Find if Path Exists in Graph[Depth-First Search,Breadth-First Search,Union Find,Graph]

https://leetcode.com/problems/find-if-path-exists-in-graph/description/?envType=problem-list-v2&envId=graphThere is a bi-directional graph with n vertices, where each vertex is labeled from 0 to n - 1 (inclusive). The edges in the graph are represented as a 2D integer array edges, where each edges[i] = [ui, vi] denotes a bi-directional edge between vertex ui and vertex vi. Every vertex pair is c..

Coding_Practice 2024.10.28

Count the Number of Good Subarrays[M,Array,Hash Table,Sliding Window]

https://leetcode.com/problems/count-the-number-of-good-subarrays/description/Given an integer array nums and an integer k, return the number of good subarrays of nums.A subarray arr is good if it there are at least k pairs of indices (i, j) such that i  and arr[i] == arr[j].A subarray is a contiguous non-empty sequence of elements within an array. Example 1:Input: nums = [1,1,1,1,1], k = 10Outpu..

Coding_Practice 2024.09.11

Insert Greatest Common Divisors in Linked List[M,Linked List,Math,Number Theory]

https://leetcode.com/problems/insert-greatest-common-divisors-in-linked-list/description/?envType=daily-question&envId=2024-09-10Given the head of a linked list head, in which each node contains an integer value.Between every pair of adjacent nodes, insert a new node with a value equal to the greatest common divisor of them.Return the linked list after insertion.The greatest common divisor of tw..

Coding_Practice 2024.09.10

Find the Student that Will Replace the Chalk[M,Array,Binary Search,Simulation,Prefix Sum]

https://leetcode.com/problems/find-the-student-that-will-replace-the-chalk/description/?envType=daily-question&envId=2024-09-02There are n students in a class numbered from 0 to n - 1. The teacher will give each student a problem starting with the student number 0, then the student number 1, and so on until the teacher reaches the student number n - 1. After that, the teacher will restart the pr..

Coding_Practice 2024.09.02

Symmetric Tree[E,Tree,Depth-First Search,Breadth-First Search,Binary Tree]

https://leetcode.com/problems/symmetric-tree/description/Given the root of a binary tree, check whether it is a mirror of itself (i.e., symmetric around its center). Example 1:Input: root = [1,2,2,3,4,4,3]Output: trueExample 2:Input: root = [1,2,2,null,3,null,3]Output: false Constraints:The number of nodes in the tree is in the range [1, 1000].-100  Follow up: Could you solve it both recursively..

Coding_Practice 2024.07.31

Design HashMap[E,Array,Hash Table,Linked List,Design,Hash Function]

https://leetcode.com/problems/design-hashmap/description/Design a HashMap without using any built-in hash table libraries.Implement the MyHashMap class:MyHashMap() initializes the object with an empty map.void put(int key, int value) inserts a (key, value) pair into the HashMap. If the key already exists in the map, update the corresponding value.int get(int key) returns the value to which the s..

Coding_Practice 2024.07.26

Review 11 - Data Indexed Array, Hash in Python

https://eglife.tistory.com/80 Review 10 - 각종 Tree / Graph Traversals in Pythonhttps://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 - Pythoneglife.tistory.com 대망의 파이썬 마지막부분이다. 아 정말 쉽지 않은 여정이다. Graph vs Tree : ..

SW 만학도/Python 2024.07.10

4. Function ic C - Grammer

https://eglife.tistory.com/40 3. Control Structures in C - Condition ( While / For Loop ) https://eglife.tistory.com/33 2-1. Operators / Memory in C https://eglife.tistory.com/32 2. Variables in C 아무리 봐도 불친절한 C.. 파이썬을 배우다가 와서 그런가 불편한 게 이만 저만이 아니다. 그래도 파이썬코드보 eglife.tistory.com If / Else / While 같은 건 C나 Python이나 비슷하다. 다만, Indentation / 중괄호로 구문을 구분하는 것들이 좀 차이가 있다. Python과 C에서 Function / Memory 부분이..

SW 만학도/C 2024.03.25