일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- Class
- 시바견
- Convert Sorted List to Binary Search Tree
- 315. Count of Smaller Numbers After Self
- 프로그래머스
- t1
- 715. Range Module
- kaggle
- shiba
- 30. Substring with Concatenation of All Words
- 밴픽
- data science
- 운영체제
- iterator
- Generator
- DWG
- Python Code
- 컴퓨터의 구조
- Python Implementation
- Python
- 109. Convert Sorted List to Binary Search Tree
- 43. Multiply Strings
- Decorator
- attribute
- Protocol
- LeetCode
- Regular Expression
- 파이썬
- Substring with Concatenation of All Words
- concurrency
- Today
- Total
목록Computer Science/C++ (38)
Scribbling
LeetCode: 30. Substring with Concatenation of All Words https://leetcode.com/problems/substring-with-concatenation-of-all-words/description/?envType=study-plan-v2&envId=top-interview-150 Substring with Concatenation of All Words - LeetCode Can you solve this real interview question? Substring with Concatenation of All Words - You are given a string s and an array of strings words. All the string..
LeetCode: 410. Split Array Largest Sum https://leetcode.com/problems/split-array-largest-sum/description/ Split Array Largest Sum - LeetCode Can you solve this real interview question? Split Array Largest Sum - Given an integer array nums and an integer k, split nums into k non-empty subarrays such that the largest sum of any subarray is minimized. Return the minimized largest sum of the split. ..
LeetCode: 394. Decode String https://leetcode.com/problems/decode-string/description/ Decode String - LeetCode Can you solve this real interview question? Decode String - Given an encoded string, return its decoded string. The encoding rule is: k[encoded_string], where the encoded_string inside the square brackets is being repeated exactly k times. Note that k is g leetcode.com class Solution { ..
LeetCode 297. Serialize and Deserialize Binary Tree https://leetcode.com/problems/serialize-and-deserialize-binary-tree/ Serialize and Deserialize Binary Tree - LeetCode Can you solve this real interview question? Serialize and Deserialize Binary Tree - Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffe..
LeetCode 290. Word Pattern https://leetcode.com/problems/word-pattern/ Word Pattern - LeetCode Can you solve this real interview question? Word Pattern - Given a pattern and a string s, find if s follows the same pattern. Here follow means a full match, such that there is a bijection between a letter in pattern and a non-empty word in s. Example leetcode.com class Solution { public: bool wordPat..
1. Function types a) return type: int, arg type: double (function) int func(double) int (double) b) return type: &int[2][3], arg type: double (function) int (*func(double))[2][3] int (*(double))[2][3] c) return type: function pointer of (b), arg type: double (function pointer) int (*(*)(double))[2][3] d) return type: int[2][3], arg type: vector (function) int (std::vector)[2][3] 2. typedef typed..
#include #include #include #include #include #include #include #include #include using namespace std; class Solution { public: int solution(int n, int m, vector& burstTime) { int ret = accumulate(burstTime.begin(), burstTime.end(), 0); int left = *max_element(burstTime.begin(), burstTime.end()); int right = ret; while (left
LeetCode 34. Find First and Last Position of Element in Sorted Array https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array/ Find First and Last Position of Element in Sorted Array - LeetCode Can you solve this real interview question? Find First and Last Position of Element in Sorted Array - Given an array of integers nums sorted in non-decreasing order, find the ..
LeetCode 125. Valid Palindrome https://leetcode.com/problems/valid-palindrome/ Valid Palindrome - LeetCode Can you solve this real interview question? Valid Palindrome - A phrase is a palindrome if, after converting all uppercase letters into lowercase letters and removing all non-alphanumeric characters, it reads the same forward and backward. Alphanumeric cha leetcode.com class Solution { publ..
https://leetcode.com/problems/longest-consecutive-sequence/ class Solution { public: int longestConsecutive(vector& nums) { int ret = 0; unordered_set num_set(nums.begin(), nums.end()); for (int num : nums) { // not found if (num_set.find(num - 1) == num_set.end()) { int cnt = 0; while (num_set.find(num) != num_set.end()) { num += 1; cnt += 1; } ret = max(ret, cnt); } } return ret; } };