일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- Python
- Regular Expression
- 컴퓨터의 구조
- Protocol
- DWG
- Decorator
- Python Implementation
- Python Code
- 30. Substring with Concatenation of All Words
- attribute
- 밴픽
- 109. Convert Sorted List to Binary Search Tree
- LeetCode
- 프로그래머스
- iterator
- Convert Sorted List to Binary Search Tree
- Substring with Concatenation of All Words
- 시바견
- Class
- Generator
- shiba
- 43. Multiply Strings
- t1
- 715. Range Module
- 315. Count of Smaller Numbers After Self
- 파이썬
- kaggle
- concurrency
- data science
- 운영체제
- Today
- Total
목록전체 글 (382)
Scribbling
https://leetcode.com/problems/merge-k-sorted-lists/description/ LeetCode - The World's Leading Online Programming Learning Platform 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 using namespace std; struct ListNode { int val; ListNode *next; ListNode() : val(0), next(nullptr) {} ListNode(..
https://leetcode.com/problems/least-number-of-unique-integers-after-k-removals/?envType=daily-question&envId=2024-02-16 class Solution { public int findLeastNumOfUniqueInts(int[] arr, int k) { Map counter = new HashMap(); for (int num : arr) { counter.merge(num, 1, Integer::sum); } List list = new ArrayList(); for (Integer key : counter.keySet()) { Integer val = counter.get(key); List tmp = new ..
using namespace std; class Shape { public: virtual void roar() = 0; virtual ~Shape() {}; }; class I_Shape { public: friend ostream &operator
https://leetcode.com/problems/longest-increasing-subsequence/ LeetCode - The World's Leading Online Programming Learning Platform 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 class Solution { public: int lengthOfLIS(vector& nums) { vector tmp; for (int num : nums) { auto it = lower_bound..
https://leetcode.com/problems/sliding-window-maximum/ class Solution { public: vector maxSlidingWindow(vector& nums, int k) { vector ret; deque q; for(int i=0; i= k - 1) { ret.push_back(nums[q[0]]); } } return ret; } };
https://leetcode.com/problems/meeting-rooms-ii/description/ LeetCode - The World's Leading Online Programming Learning Platform 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 class Solution { public: int minMeetingRooms(vector& intervals) { sort(intervals.begin(), intervals.end()); priorit..
1. Default Constructor In C++, when making an array, we cannot explicitly call a constructor other than the default one. 2. Converting Constructor C++ compiler may implicitly convert a value to an object. (In this case, integer to Cell object) class Cell { public: int num = 0; Cell() = default; Cell(int num) { this->num = num; } }; int main() { Cell cell1{ 4 }; cell1 = 5; cout
To design a hashmap, we need 1) hashing function -- will use hash() method 2) an array for the hash table 3) Linkedlist for hash collision class Node: def __init__(self, key, val, nxt=None): self.key = key self.val = val self.nxt = nxt class LinkedList: def __init__(self): self.head = Node(0, 0) def append(self, key, val) -> None: prv, cur = self.head, self.head.nxt while cur is not None: if cur..
https://leetcode.com/problems/minimum-genetic-mutation/description/?envType=study-plan-v2&envId=top-interview-150 LeetCode - The World's Leading Online Programming Learning Platform 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 class Solution { public: int minMutation(string startGene, st..
https://leetcode.com/problems/binary-search-tree-iterator/description/?envType=study-plan-v2&envId=top-interview-150 LeetCode - The World's Leading Online Programming Learning Platform 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 Python Code with yield # Definition for a binary tree node..