Python

【Python】連結リストの概要・イメージ・実装・使い方を整理

連結リストに関するメモ。 自分が腹落ちすることを優先で自分のイメージで書く。 連結リストについて 概要 通常のリストとの違い Pythonのリストは先に箱を用意しておき、その箱の中に要素を格納していくイメー...
Back-End Developer Interview Questions

【Back-End Developer Interview Questions】Law of Demeter:デメテルの法則

Github上にバックエンドエンジニア採用時の質問に使える題材としてまとめられているページがある。コンピュータアーキテクチャ、デザインパターン、DB、Web、分散システム、チームマネジメントなど多種多様な題材がある。 解答はG...
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...
Python

【Python】if文でのNone、空文字、True、False、0、”==”と”is”の違いなどの判定を整理

Pythonのif文でNone、空文字、0の判定をする時、思った通りに動作しないことがよくあるため、この記事でそれぞれの判定についてまとめます。 Bool変数(True,False)の判定 コマンドプロンプトで以下を実行して確認...
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...
Python

【Pytnon】リストの使い方(作成・追加・削除・結合・検索・ソート)を整理【list】

この記事では、Pythonのリスト リスト(list)について リストは複数の値をまとめて操作することができるデータ型の一つ リスト内に含まれる値はそれぞれを要素と呼ぶ リストの各要素は整数、浮動小数点数、文...
Python

【LeetCode】46. Permutations 解答・解説【Python】

問題 原文 Given an array nums of distinct integers, return all the possible permutations. You can return the answer in a...
Python

Pythonのリスト内包(一重・二重)の書き方

リスト内包について Pythonにはfor文を使って繰り返し処理を行う機能がある。 リスト内包を使うと、そのfor文を1行で簡潔に記述することができる。 リスト内包 例1:1から10までの数字をリストにして表示 ...
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...
Back-End Developer Interview Questions

【Back-End Developer Interview Questions】Inversion of Control:制御の反転

Github上にバックエンドエンジニア採用時の質問に使える題材としてまとめられているページがある。コンピュータアーキテクチャ、デザインパターン、DB、Web、分散システム、チームマネジメントなど多種多様な題材がある。 解答はG...