Algorithm
-
[LeetCode]#682. Baseball GameAlgorithm/LeetCode 2021. 8. 13. 16:19
Given two strings s and t, return true if they are equal when both are typed into empty text editors. '#' means a backspace character. Note that after backspacing an empty text, the text will continue empty. Example 1: Input: s = "ab#c", t = "ad#c" Output: true Explanation: Both s and t become "ac". Example 2: Input: s = "ab##", t = "c#d#" Output: true Explanation: Both s and t become "". Exampl..
-
[Leetcode] 844. Backspace String CompareAlgorithm/LeetCode 2021. 8. 13. 15:06
844. Backspace String Compare Easy 2788126Add to ListShare Given two strings s and t, return true if they are equal when both are typed into empty text editors. '#' means a backspace character. Note that after backspacing an empty text, the text will continue empty. Example 1: Input: s = "ab#c", t = "ad#c" Output: true Explanation: Both s and t become "ac". Example 2: Input: s = "ab##", t = "c#d..
-
[Leetcode] 1598. Crawler Log FolderAlgorithm/LeetCode 2021. 8. 13. 14:41
1598. Crawler Log Folder Easy 31225Add to ListShare The Leetcode file system keeps a log each time some user performs a change folder operation. The operations are described below: "../" : Move to the parent folder of the current folder. (If you are already in the main folder, remain in the same folder). "./" : Remain in the same folder. "x/" : Move to the child folder named x (This folder is gu..
-
[LeetCode] 1791. Find Center of Star GraphAlgorithm/LeetCode 2021. 8. 13. 10:03
There is an undirected star graph consisting of n nodes labeled from 1 to n. A star graph is a graph where there is one center node and exactly n - 1 edges that connect the center node with every other node. You are given a 2D integer array edges where each edges[i] = [ui, vi] indicates that there is an edge between the nodes ui and vi. Return the center of the given star graph. Example 1: Input..