전체 글

개발 공부하는 블로그
✨ 문제 The K Weakes Rows in a  Matrix You are given an m x n binary matrix mat of 1's (representing soldiers) and 0's (representing civilians). The soldiers are positioned in front of the civilians. That is, all the 1's will appear to the left of all the 0's in each row.A row i is weaker than a row j if one of the following is true:The number of soldiers in row i is less than the number of soldier..
·Spring
🔔 참고 블로그 🔔 위 블로그를 참고해 CodeDeploy 설정을 하던 중에 EC2 IAM Role과 CodeDeploy IAM Role을 생성하게 되는데,나는 CodeDeploy가 일방적으로 EC2에 배포를 한다고 생각하고 있었는데EC2 IAM Role을 왜 생성하는가 대해 찾아보다가 CodeDeploy Agent의 존재에 대해 알게되었다.   ✨ CodeDeploy와 CodeDeploy Agent가 배포를 진행하는 과정일단 내가 하려는 CI/CD 흐름은 Github Actions가 S3에 빌드 파일을 업로드하고 CodeDeploy에게 배포 요청을 보내면 CodeDeploy가 S3에 업로드된 빌드 파일을 EC2에 배포하는 것이다.  🔔 CodeDeploy with 배포 지침 👉🏻 CodeDep..
✨ 문제 Delete Greatest Value in Each RowYou are given an m x n matrix grid consisting of positive integers.Perform the following operation until grid becomes empty:Delete the element with the greatest value from each row. If multiple such elements exist, delete any of them. Add the maximum of deleted elements to the answer.Note that the number of columns decreases by one after each operation.Retur..
✨ 문제 Baseball GamesYou are keeping the scores for a baseball game with strange rules. At the beginning of the game, you start with an empty record.You are given a list of strings operations, where operations[i] is the ith operation you must apply to the record and is one of the following:An integer x.Record a new score of x.'+'Record a new score that is the sum of the previous two scores.'D'Reco..
·Spring
✨ 아키텍처 흐름🔔 배포 흐름코드 수정 후 깃허브에 push하면 Github Actions 트리거가 동작하여 빌드 및 DockerFile, deploy.sh, application.yaml 등을 포함하여 zip 파일을 생성한다.생성된 zip파일은 S3에 업로드되고 CodeDeploy에 배포 요청을 보내면 S3에 업로드 된 zip파일을 EC2에 배포한다. EC2 인스턴스에서 DockerFile을 통해 이미지가 만들어지고 Docker 컨테이너에 애플리케이션과 Redis가 띄워진다.Spring Boot 애플리케이션과 Redis는 동일한 Docker 네트워크에 연결되어 실행된다. 우리 서비스는 처음에는 MVC로 구현되었다가 Rest API로 리팩토링을 하였는데 모든 도메인이 리팩토링이 되지 않았기 때문에 m..
✨ 문제 Final Prices With a Special Discount in a ShopYou are given an integer array prices where prices[i] is the price of the ith item in a shop. There is a special discount for items in the shop. If you buy the ith item, then you will receive a discount equivalent to prices[j] where j is the minimum index such that j > i and prices[j] . Otherwise, you will not receive any discount at all . Retur..
✨ 문제 Number of Recent CallsYou have a RecentCounter class which counts the number of recent requests within a certain time frame.Implement the RecentCounter class:RecentCounter() Initializes the counter with zero recent requests. int ping(int t) Adds a new request at time t, where t represents some time in milliseconds, and returns the number of requests that has happened in the past 3000 millis..
✨ 문제 Number of Students Unable to Eat LunchThe school cafeteria offers circular and square sandwiches at lunch break, referred to by numbers 0 and 1 respectively. All students stand in a queue. Each student either prefers square or circular sandwiches.The number of sandwiches in the cafeteria is equal to the number of students. The sandwiches are placed in a stack. At each step:If the student at..
✨ 문제 Find Targer Indices After Sorting ArrayYou are given a 0-indexed integer array nums and a target element target.A target index is an index i such that nums[i] == target.Return a list of the target indices of nums after sorting nums in non-decreasing order. If there are no target indices, return an empty list. The returned list must be sorted in increasing order. https://leetcode.com/problem..
✨ 문제 Neither Minimum nor MaximumGiven an integer array nums containing distinct positive integers, find and return any number from the array that is neither the minimum nor the maximum value in the array, or -1 if there is no such number. Return the selected integer.  https://leetcode.com/problems/neither-minimum-nor-maximum/description/   ✨ 최종코드class Solution { public int findNonMinOrMax(int..
yeooniyeoon
개공블