LeetCode

【LeetCode】202. Happy Number 解答・解説【Python】

問題 原文 Write an algorithm to determine if a number n is happy. A happy number is a number defined by the following...
LeetCode

【LeetCode】637. Average of Levels in Binary Tree 解答・解説【Python】

問題 原文 Given the root of a binary tree, return the average value of the nodes on each level in the form of an array. ...
LeetCode

【LeetCode】107. Binary Tree Level Order Traversal II 解答・解説【Python】

問題 原文 Given the root of a binary tree, return the bottom-up level order traversal of its nodes' values. (i.e., from ...
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: ...
LeetCode

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

問題 原文 Given an integer array nums, return the length of the longest strictly increasing  subsequence . ...
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 ...
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...
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...
通信・ネットワーク

TCP/IPに関するメモ

コンピュータネットワークにおけるTCP/IPについてのメモ TCP 3ウェイハンドシェイク ■概要 ・ホスト間でコネクションを確立し、通信を開始するための仕組み ・以下の信号をお互いに送りあう ・...
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...