분류 전체보기
-
[Algorithm] LeetCode 238.product-of-array-except-selfAlgorithm 2023. 10. 10. 23:23
238. Product of Array Except Self Medium Given an integer array nums, return an array answer such that answer[i] is equal to the product of all the elements of nums except nums[i]. The product of any prefix or suffix of nums is guaranteed to fit in a 32-bit integer. You must write an algorithm that runs in O(n) time and without using the division operation. Example 1: Input: nums = [1,2,3,4] Out..
-
[Algorithm] LeetCode 217.contains-duplicateAlgorithm 2023. 10. 10. 23:20
217. Contains Duplicate Easy Given an integer array nums, return true if any value appears at least twice in the array, and return false if every element is distinct. Example 1: Input: nums = [1,2,3,1] Output: true Example 2: Input: nums = [1,2,3,4] Output: false Example 3: Input: nums = [1,1,1,3,3,4,3,2,4,2] Output: true Constraints: 1
-
[Algorithm] LeetCode 121. Best Time to Buy and Sell StockAlgorithm 2023. 9. 30. 20:07
121. Best Time to Buy and Sell Stock Easy You are given an array prices where prices[i] is the price of a given stock on the ith day. You want to maximize your profit by choosing a single day to buy one stock and choosing a different day in the future to sell that stock. Return the maximum profit you can achieve from this transaction. If you cannot achieve any profit, return 0. Example 1: Input:..
-
[LeetCode] 추천 75 문제 및 알고리즘 공부 방법Algorithm 2023. 9. 30. 18:11
주소 https://www.teamblind.com/post/New-Year-Gift---Curated-List-of-Top-75-LeetCode-Questions-to-Save-Your-Time-OaM1orEU New Year Gift - Curated List of Top 75 LeetCode Questions to Save Your Time New Year Gift to every fellow time-constrained engineer out there looking for a job, here's a list of the best LeetCode questions that teach you core concepts and techniques for each category/type of pro..
-
[Algorithm] LeetCode 7. Reverse IntegerAlgorithm 2023. 9. 26. 00:35
7. Reverse Integer Medium Given a signed 32-bit integer x, return x with its digits reversed. If reversing x causes the value to go outside the signed 32-bit integer range [-231, 231 - 1], then return 0. Assume the environment does not allow you to store 64-bit integers (signed or unsigned). Example 1: Input: x = 123 Output: 321 Example 2: Input: x = -123 Output: -321 Example 3: Input: x = 120 O..
-
[GoF Design Pattern] 전략 패턴 (Strategy Pattern)Design Pattern 2023. 9. 22. 00:46
GoF Design Pattern에 대한 설명은 아래 포스트를 참고해주세요. https://developer-been.tistory.com/41 [GoF Design Pattern] 디자인 패턴 디자인 패턴 디자인 패턴은 모듈의 세분화된 역할이나 모듈들 간의 인터페이스 구현 방식을 설계할때 참조할 수 있는 전형적인 해결 방식을 말합니다. 디자인 패턴을 통해 설계 문제, 해결 방법 developer-been.tistory.com 전략 패턴 (Strategy Design Pattern) 전략 패턴(Strategy Pattern)은 객체 지향 디자인 패턴 중 하나로, 알고리즘을 정의하고 해당 알고리즘을 캡슐화하여 교체 가능하게 만드는 패턴입니다. 이를 통해 동일한 작업을 수행하는 여러 알고리즘을 선택적으로 사..
-
[GoF Design Pattern] 디자인 패턴Design Pattern 2023. 9. 22. 00:39
디자인 패턴 디자인 패턴은 모듈의 세분화된 역할이나 모듈들 간의 인터페이스 구현 방식을 설계할때 참조할 수 있는 전형적인 해결 방식을 말합니다. 디자인 패턴을 통해 설계 문제, 해결 방법, 해결 방법을 언제 적용해야 할지, 그 결과는 무엇인지 등을 알 수 있습니다. 또한 디자인 패턴은 한 패턴에 변형을 가하거나 어떠한 요구사항을 반영하면 다른 패턴으로 변형되는 특징이 있습니다. 1995년 GoF(Gang of Four)라고 불리는 Erich Gamma, Richard Helm, Ralph Johnson, John Vissides가 처음으로 디자인 패턴을구체화 하였습니다. GoF의 디자인 패턴은 소프트웨어 공학에서 가장 많이 사용되는 디자인 패턴이며 목적에 따라 분류할 시 생성 패턴 5개, 구조 패턴 7개..
-
[Spring] Spring Boot에서 아임포트 다날 본인인증 연동(Rest Api)Spring 2023. 9. 21. 23:44
서버에서 본인인증을 처리하는 방법은 여러가지가 있다. 1) 이메일을 통한 본인인증 2) SMS를 통한 본인인증 3) PG사 제공 본인인증 서비스 이용 그 중에 3번 즉, iamport의 다날 PG사를 이용한 본인인증 서비스를 Spring Boot에서 Rest Api 방식으로 연동하는 방법을 작성해본다. 개발 환경: 💡 Spring Boot 2.5.5 💡 Java 1.8 💡 JPA 💡 Maven 💡 WebView Target: Unity 📌 아임포트 관리자 콘솔에서 가맹점 식별코드와 Api Key, Api Secret Key를 발급 받았다는 전제하에 진행한다. 먼저, 동작 순서는 아래와 같다. 1. 클라이언트에서 '본인인증하기' 클릭시 서버에 웹뷰 인증값을 요청 2. 서버에서 인증토큰(인증값 UUID, 만..