반응형 분류 전체보기128 [DSA][Heap] 01. Kth Largest Element in a Stream LeetCode 703 01. Kth Largest Element in a StreamYou are part of a university admissions office and need to keep track of the kth highest test score from applicants in real-time.This helps to determine cut-off marks for interviews and admissions dynamically as new applicants submit their scores.You are tasked to implement a class which, for a given integer k, maintains a stream of test scores and.. 2025. 8. 3. [DSA][Trie] 02. Design Add and Search Words Data Structure LeetCode 211 02. Design Add and Search Words Data StructureDesign a data structure that supports adding new words and finding if a string matches any previously added string.Implement the WordDictionary class:- WordDictionary() Initializes the object.- void addWord(word) Adds word to the data structure, it can be matched later.- bool search(word) Returns true if there is any string in the data s.. 2025. 7. 31. [DSA][Trie] 01. Implement Trie (Prefix Tree) LeetCode 208 01. Implement Trie (Prefix Tree)A trie (pronounced as "try") or prefix tree is a tree data structure used to efficiently store and retrieve keys in a dataset of strings.There are various applications of this data structure, such as autocomplete and spellchecker.Implement the Trie class:- Trie() Initializes the trie object.- void insert(String word) Inserts the string word into the t.. 2025. 7. 30. [DSA][Trees] 15. Serialize and Deserialize Binary Tree LeetCode 297 15. Serialize and Deserialize Binary TreeSerialization 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 buffer, or transmitted across a network connection link to be reconstructed later in the same or another computer environment.Design an algorithm to serialize and deserialize a binary tree.There is no rest.. 2025. 7. 27. 이전 1 ··· 6 7 8 9 10 11 12 ··· 32 다음