二分探索

Atcoder

Atcoder対策用入力・データ構造・数学・アルゴリズムの整理

スニペット
LeetCode

【LeetCode】300. Longest Increasing Subsequence 解答・解説【Python】

問題 原文 Given an integer array nums, return the length of the longest strictly increasing  subsequence . ...
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...
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...
LeetCode

【LeetCode】167. Two Sum II – Input Array Is Sorted 解答・解説【Python】

問題 原文 Given a 1-indexed array of integers numbers that is already sorted in non-decreasing order, find two numbers s...
LeetCode

【LeetCode】278. First Bad Version 解答・解説【Python】

はじめに LeetCodeの問題を解答します。 なるべく、問題の和訳と詳細なコメントを書いています。 余裕があれば、複数のアプローチの解答と、実際の面接を想定して英語での解法やコメントを書いています。 ...
LeetCode

【LeetCode】704. Binary Search 解答・解説【Python】

はじめに LeetCodeの問題を解答します。 なるべく、問題の和訳と詳細なコメントを書いています。 余裕があれば、複数のアプローチの解答と、実際の面接を想定して英語での解法やコメントを書いています。 様々な...