LeetCode 【LeetCode】2351. First Letter to Appear Twice 解答・解説【Python】 問題 原文 Given a string s consisting of lowercase English letters, return the first letter to appear twice. Note: ... 2023.05.05 LeetCodePython
LeetCode 【LeetCode】300. Longest Increasing Subsequence 解答・解説【Python】 問題 原文 Given an integer array nums, return the length of the longest strictly increasing subsequence . ... 2023.05.04 LeetCodePythonアルゴリズム二分探索動的計画法
Python 【LeetCode】413. Arithmetic Slices 解答・解説【Python】 問題 原文 An integer array is called arithmetic if it consists of at least three elements and if the difference between ... 2023.05.03 Pythonアルゴリズム動的計画法
Python 【LeetCode】62. Unique Paths 解答・解説【Python】 問題 原文 There is a robot on an m x n grid. The robot is initially located at the top-left corner (i.e., grid). The rob... 2023.05.03 Pythonアルゴリズムメモ化再帰動的計画法
LeetCode 【LeetCode】45. Jump Game II 解答・解説【Python】 問題 原文 You are given a 0-indexed array of integers nums of length n. You are initially positioned at nums. Each el... 2023.05.02 LeetCodePython
LeetCode 【LeetCode】55. Jump Game 解答・解説【Python】 問題 原文 You are given an integer array nums. You are initially positioned at the array's first index, and each element... 2023.04.30 LeetCodePython
LeetCode 【LeetCode】17. Letter Combinations of a Phone Number 解答・解説【Python】 問題 原文 Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number c... 2023.04.30 LeetCodePythonアルゴリズムバックトラッキング
LeetCode 【LeetCode】40. Combination Sum II 解答・解説【Python】 問題 原文 Given a collection of candidate numbers (candidates) and a target number (target), find all unique combination... 2023.04.30 LeetCodePythonアルゴリズムバックトラッキング深さ優先探索
Python Pythonでif and or elif else notなどの使い方をまとめる Pythonの初心者向けにif文の使い方について一からまとめます。 自分でプログラムを書くときに必須になるとても大切な知識になります。 for文と並び、少しずつでも良いので必ず使えるように覚えておきましょう。 ... 2023.04.26 Python基本
Python 【Python】for文の使い方。ループ・繰り返し処理の書き方。【初心者】 ループ・繰り返し処理に使われるfor文の構造 for文を使うことで繰り返し処理を作ることができます。 for文の構造は以下のようになっています。 for 変数 in シーケンス: 繰り返し中の処理 ・ ・... 2023.04.24 Python基本