
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 for 루프로 간단하게 푼 것 class Solution { public: int maxSubArray(vector& nums) { int len = nums.size(); int ans = 0; if(len == 1) return nums[0]; int sum = 0; bool trig = false; for(..
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 스택사용 ool isValid(string s) { stack st; int len = s.size(); st.push(s[0]); for(int i = 1; i < len; i++) { // if it's closing if(s[i] == ')') { if(st.empty() || st.top() != '(..

"abcabcbb" int left = 0, right = 0; for(right = 0; right < s.size(); right++) { a // l = 0, right = 0 ab // l = 0, right = 1 abc // l = 0, right = 2 // 다음이 a인데 a는 이미 있다. 따라서 left를 전에 있던 a다음으로 옮김. bc // l = 1, r = 2 bca // l = 1, r = 3 // 다음은 b인데 b는 이미 있다. 따라서 left를 전에 있던 b 다음으로 옮김 ca // l = 2, r = 3 cab // l = 2, r = 4 // 다음은 c인데 c는 이미 있다. 따라서 left를 전에 있던 c 다음으로 옮김. ab // l = 3, r = 4 abc // l =..
- Total
- Today
- Yesterday
- Kruskal
- binary search
- Brute Force
- 조합
- recursion
- dfs
- Unity
- BFS
- C++
- db
- graph
- 이분탐색
- Tree
- DP
- permutation
- Implementation
- 재귀
- 자료구조
- C
- Dijkstra
- Spring
- greedy
- back tracking
- MVC
- two pointer
- CSS
- Python
- Stack
- priority queue
- floyd warshall
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |