본문 바로가기
728x90
OOP(Object-Oriented Programming)의 5대 원칙(SOLID)과 4가지 특성 OOP(Object-Oriented Programming)란? 객체 지향 프로그래밍 방식 OOP 이전의 프로그래밍 방식은? 절차적 프로그래밍, 구조적 프로그래밍 두 가지가 있었다. 절차적 프로그래밍은프로시저로 구성된 프로그래밍 방식을 말한다. 절차적 프로그래밍은 C, Algo, Cobol, Basic 등이 있다. 구조적 프로그래밍은 절차적 프로그래밍과 비슷하지만 프로시저를 기준으로 나누는 것이 아닌 모듈을 기준으로 나눈다. 절차적 프로그래밍이 프로시저로 쪼갰다면 그 프로시저를 비슷한 애들끼리 묶어서 소스파일로 묶은 것을 모듈이라고 생각하면 쉽다. "모듈 > 프로시저" 구조적 프로그래밍은 큰 문제를 해결하기 위해 문제를 작은 단위들로 나누어 해결하는 방식이어서 "Top-Down 방식"이라고도 한다. 객체.. 2022. 2. 16.
leetcode 136) Single Number LV. Easy 😎 https://leetcode.com/problems/single-number/ Single Number - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제 Given a non-empty array of integers nums, every element appears twice except for one. Find that single one. You must implement a solution with a linear runtime.. 2022. 2. 15.
leetcode 104) Maximum Depth of Binary Tree LV. Easy 😎 https://leetcode.com/problems/maximum-depth-of-binary-tree/ Maximum Depth of Binary Tree - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제 Given the root of a binary tree, return its maximum depth. A binary tree's maximum depth is the number of nodes along the longest.. 2022. 2. 14.
leetcode 78) Subsets LV. Medium 🧐 https://leetcode.com/problems/subsets/ Subsets - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제 Given an integer array nums of unique elements, return all possible subsets (the power set). The solution set must not contain duplicate subsets. Return the solution in .. 2022. 2. 13.
leetcode 127) Word Ladder LV. Hard 🥵 https://leetcode.com/problems/word-ladder/ Word Ladder - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제 A transformation sequence from word beginWord to word endWord using a dictionary wordList is a sequence of words beginWord -> s1 -> s2 -> ... -> sk such that: Ever.. 2022. 2. 12.
leetcode 560) Subarray Sum Equals K LV. Medium 🧐 https://leetcode.com/problems/subarray-sum-equals-k/ Subarray Sum Equals K - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제 Given an array of integers nums and an integer k, return the total number of continuous subarrays whose sum equals to k. Example 1: Input: nu.. 2022. 2. 11.
leetcode 567) Permutation in String LV. Medium 🧐 https://leetcode.com/problems/permutation-in-string/ Permutation in String - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제 Given two strings s1 and s2, return true if s2 contains a permutation of s1, or false otherwise. In other words, return true if one of s1's p.. 2022. 2. 11.
leetcode 532) K-diff Pairs in an Array LV. Medium 🧐 https://leetcode.com/problems/k-diff-pairs-in-an-array/ K-diff Pairs in an Array - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제 Given an array of integers nums and an integer k, return the number of unique k-diff pairs in the array. A k-diff pair is an integer pa.. 2022. 2. 9.
leetcode 258) Add Digits LV. Easy 😎 https://leetcode.com/problems/add-digits/ Add Digits - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제 Given an integer num, repeatedly add all its digits until the result has only one digit, and return it. Example 1: Input: num = 38 Output: 2 Explanation: The process.. 2022. 2. 8.
leetcode 389) Find the Difference LV. Easy 😎 https://leetcode.com/problems/find-the-difference/ Find the Difference - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제 You are given two strings s and t. String t is generated by random shuffling string s and then add one more letter at a random position. Return the.. 2022. 2. 7.
728x90