일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
- security
- scss
- Clone
- TypeScript
- nginx
- VUE
- generic
- AI
- bash
- condition
- C++
- docker
- BOJ
- vue.js
- type
- property
- npm
- var
- git
- 보안
- vuetify
- dotenv
- JavaScript
- 앙상블
- C#
- webpack
- leetcode
- loop
- Python
- machine learning
- Today
- Total
목록PS (53)
ice rabbit programming
https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/ Two Sum II - Input array is sorted - 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 Two Sum 2탄이다. 이미 정렬된 배열에서, 합이 target과 맞는 인덱스를 반환한다. class Solution { public: vector twoSum(vector& numbers, int target) { vector resu..
https://leetcode.com/problems/linked-list-cycle/ [ Linked List Cycle - 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 ](https://leetcode.com/problems/linked-list-cycle/) 리스트에 사이클이 있는지 여부를 판단하는 검사이다. 대기업 코테 준비 당시에는 BFS, DFS만 죽어라 하다가 리스트 관련 문제를 처음 접해서 처음에 풀이법이 잘 떠오르지 않았다. C#으로 풀었고, ..
https://leetcode.com/problems/remove-duplicates-from-sorted-list/ [ Remove Duplicates from Sorted List - 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 ](https://leetcode.com/problems/remove-duplicates-from-sorted-list/) 이 문제와 비슷한데, 여기서는 배열이 아닌 List이다. value가 같으면 연결을 끊고 그 다음을 연결했다..
https://leetcode.com/problems/climbing-stairs/ Climbing Stairs - 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 1스텝 혹은 2스텝씩 이동하여 계단을 오르는 문제이다. 전형적인 DP 문제이다. 해당 칸까지 가는 수는 이전 칸에서 해당 칸에 오는 수만큼이기 때문이다. Kn = Kn-1 + Kn-2의 간단한 점화식을 찾아서 구현하였다. class Solution { public: int climbStairs(int ..
https://leetcode.com/problems/maximum-subarray/ Maximum Subarray - 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 주어진 배열의 부분집합 중 가장 합이 큰 경우이다. 사실 이 때까지 푼 easy 단계 중 가장 생각이 오래 걸렸던 것 같다. 연속된 합이 가장 큰 경우의 결과값을 return하였다. class Solution { public: int maxSubArray(vector& nums) { int ans=..
https://leetcode.com/problems/valid-parentheses/ Valid Parentheses - 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 괄호가 유효한지 검사하는 전형적인 stack 문제이다. class Solution { public: bool isValid(string s) { stack* sc = new stack(); for(int i=0;ipush(s[i]); break; case '{': sc->push(s[i]); b..
https://leetcode.com/problems/longest-common-prefix/ [ Longest Common Prefix - 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 ](https://leetcode.com/problems/longest-common-prefix/) 겹치는 가장 긴 prefix를 구하는 문제이다. 단순하게 풀었다. 이 문제도 C# // C# public class Solution { public string LongestCo..
https://leetcode.com/problems/remove-element/ [ Remove Element - 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 ](https://leetcode.com/problems/remove-element/) 이전 문제와 비슷하게 반환 값만큼 input array를 검사한다. 다만 전 문제보다 조금 쉬운 듯? 그냥 제거한 만큼 앞으로 당겼다. 이 문제도 C#으로 풀었다. // C# public class Solution ..