LeetCode 【LeetCode】986. Interval List Intersections 解答・解説【Python】 問題 原文 You are given two lists of closed intervals, firstList and secondList, where firstList = and secondLi... 2023.04.22 LeetCodePythontwo pointerアルゴリズム
LeetCode 【LeetCode】153. Find Minimum in Rotated Sorted Array 解答・解説【Python】 問題 原文 Suppose an array of length n sorted in ascending order is rotated between 1 and n times. For example, the arra... 2023.04.17 LeetCodePythonアルゴリズム二分探索
LeetCode 【LeetCode】74. Search a 2D Matrix 解答・解説【Python】 問題 原文 You are given an m x n integer matrix matrix with the following two properties: Each row is sorted in non... 2023.04.16 LeetCodePythonアルゴリズム二分探索
Python 【LeetCode】46. Permutations 解答・解説【Python】 問題 原文 Given an array nums of distinct integers, return all the possible permutations. You can return the answer in a... 2023.04.15 Pythonアルゴリズム深さ優先探索
LeetCode 【LeetCode】77. Combinations 解答・解説【Python】 問題 原文 Given two integers n and k, return all possible combinations of k numbers chosen from the range . You may r... 2023.04.15 LeetCodePythonアルゴリズム深さ優先探索
Python 【LeetCode】617. Merge Two Binary Trees 解答・解説【Python】 問題 原文 You are given two binary trees root1 and root2. Imagine that when you put one of them to cover the other, s... 2023.04.10 Pythonアルゴリズムデータ構造二分木再帰
LeetCode 【LeetCode】695. Max Area of Island 解答・解説【Python】 はじめに LeetCodeの問題を解答します。 なるべく、問題の和訳と詳細なコメントを書いています。 余裕があれば、複数のアプローチの解答と、実際の面接を想定して英語での解法やコメントを書いています。 様々な... 2023.04.09 LeetCodePythonアルゴリズム深さ優先探索
LeetCode 【LeetCode】733. Flood Fill 解答・解説【Python】 学習メモ 自分の言葉で書くことで理解できていない部分をハッキリさせたい。 問題 原文 An image is represented by an m x n integer grid image where image repr... 2023.04.08 LeetCodePythonアルゴリズム幅優先探索深さ優先探索
LeetCode 【LeetCode】567. Permutation in String 解答・解説【Python】 学習メモ 自分の言葉で書くことで理解できていない部分をハッキリさせたい。 問題 原文 Given two strings s1 and s2, return true if s2 contains a permutation o... 2023.04.08 LeetCodePythonアルゴリズムスライディングウインドウ
LeetCode 【LeetCode】19. Remove Nth Node From End of List 解答・解説【Python】 学習メモ。 自分の言葉で書くことで理解できていない部分をはっきりさせる。 問題 原文 Given the head of a linked list, remove the nth node from the end of th... 2023.04.08 LeetCodePythontwo pointerアルゴリズム単方向連結リスト連結リスト