Python

Pythonでif and or elif else notなどの使い方をまとめる

Pythonの初心者向けにif文の使い方について一からまとめます。 自分でプログラムを書くときに必須になるとても大切な知識になります。 for文と並び、少しずつでも良いので必ず使えるように覚えておきましょう。 ...
Python

【Python】for文の使い方。ループ・繰り返し処理の書き方。【初心者】

ループ・繰り返し処理に使われるfor文の構造 for文を使うことで繰り返し処理を作ることができます。 for文の構造は以下のようになっています。 for 変数 in シーケンス: 繰り返し中の処理 ・ ・...
Python

【Python】print関数の使い方。数字・文字列・複数・改行・format・fstring

Pythonでprint関数の使い方をまとめます。 printで数字を表示 print()関数で数字を表示するには、カッコの中に数字を入力して実行します。 カッコの中に入れられる数字などは引数と呼ばれます。 また...
LeetCode

【LeetCode】200. Number of Islands 解答・解説【Python】

問題 原文 Given an m x n 2D binary grid grid which represents a map of '1's (land) and '0's (water), return the numb...
LeetCode

【LeetCode】986. Interval List Intersections 解答・解説【Python】

問題 原文 You are given two lists of closed intervals, firstList and secondList, where firstList =  and secondLi...
Back-End Developer Interview Questions

【Back-End Developer Interview Questions】Active-Record:アクティブレコード

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

【LeetCode】844. Backspace String Compare 解答・解説【Python】

問題 原文 Given two strings s and t, return true if they are equal when both are typed into empty text editors. '#' mean...
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...