Eat Study Love

먹고 공부하고 사랑하라

코딩공부 55

Longest Non-decreasing Subarray From Two Arrays[M,Array,Dynamic Programming]

https://leetcode.com/problems/longest-non-decreasing-subarray-from-two-arrays/You are given two 0-indexed integer arrays nums1 and nums2 of length n.Let's define another 0-indexed integer array, nums3, of length n. For each index i in the range [0, n - 1], you can assign either nums1[i] or nums2[i] to nums3[i].Your task is to maximize the length of the longest non-decreasing subarray in nums3 by..

Coding_Practice 2024.07.24

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

5. Pointer - Motivation in C

https://eglife.tistory.com/41 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 파이썬과 C는 매우 다르다. C와 C++을 10년 이상 공부를 해도 한 2~3개월만 파이썬 하다보면 C, C++의 기본적인 내용도 순간 까먹을 수 있다. C의 가장 큰 특성? C..

SW 만학도/C 2024.03.26

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