Swift のコーディングチャレンジ

Swift で解けるチャレンジ 225 問。はじめてのループからグラフ、動的計画法、機械学習まで。ブラウザでコードを書き、すぐにテストを実行して AI のレビューを受けられます。

簡単 · 134 中級 · 67 難しい · 24

練習できるスキル: カウント文字列の分割桁の取り出し2 次元リストリストループ公式算術1 回の走査2 つのポインタwhileループポリモーフィズム
  • Python · C++ · C#
  • 自動テスト
  • AIコードレビュー
  • コミュニティの解答
226
チャレンジ数
123
共有された解答
9
対応言語

すべてのチャレンジ

トピック、言語、難易度で検索できます。

225件のチャレンジ
簡単

フィボナッチ数

n番目のフィボナッチ数を返してください。

学べること 反復2 変数の更新
BeginnerLoopsSequencesStudent-beginner
簡単

Average of Three

Average three whole numbers.

学べること 算術除算
BeginnerLearning-pathVariables
簡単

Rectangle Perimeter

Compute the perimeter of a rectangle from its sides.

学べること 算術戻り値
BeginnerLearning-pathVariables
難しい

Minimum Network Connection Cost

Choose undirected links so that every vertex can reach every other vertex, with minimum total cost.

学べること クラスカル法Union-Find
Disjoint-setsGraphsMinimum-spanning-tree
まだ解答がありません
簡単

ピラミッドの行

# ブロックで右寄せのピラミッドを描画します。

学べること 文字列のパターン余白
BeginnerLearning-pathNested-loopsPatterns
中級

Island Perimeter

Measure the coastline of land cells in a grid.

学べること 辺の数え上げ4 近傍の確認
AdvancedGridsHackathon
まだ解答がありません
中級

Shortest Weighted Routes

Find the minimum total route cost from city 1 to each city.

学べること ダイクストラ法遅延削除
GraphsPriority-queuesShortest-path
まだ解答がありません
中級

Tic-Tac-Toe Winner

Decide the result of a tic-tac-toe board.

学べること 勝利条件対角線
BeginnerConditionsGridsLearning-path
難しい

Trapping Rain Water

Compute how much rain water an elevation map holds.

学べること 2 つのポインタ累積最大値
AdvancedArraysCompetitive-programmingGreedy
簡単

Hollow Square

Draw the outline of a square with * characters.

学べること 縁の判定文字列の作成
BeginnerLearning-pathNested-loopsPatterns
難しい

Mini Stack-Language Interpreter

Evaluate a small stack language.

学べること トークン化命令の実行
InterpretersParsingStacks
まだ解答がありません
中級

Recursive Palindrome

Check a palindrome recursively, ignoring case and punctuation.

学べること 基底ケース文字列の整形
BeginnerLearning-pathRecursionStrings
難しい

Count Inversions

Count the out-of-order pairs in a list.

学べること マージソート分割統治
AdvancedCompetitive-programmingSorting
まだ解答がありません
簡単

Min and Max Together

Find the smallest and largest value in one pass.

学べること 1 回の走査複数の戻り値
ArraysBeginnerFunctionsLearning-path
難しい

Sliding Window Maximum

Report the maximum of every window of k numbers.

学べること 単調 dequeO(n) のウィンドウ処理
AdvancedCompetitive-programmingSliding-window
まだ解答がありません
簡単

Cash: Fewest Coins

Give change with as few U.S. coins as possible.

学べること 貪欲法両替
BeginnerGreedyStudent-beginnermath
簡単

Halve Until One

Count how many halvings bring a number down to 1.

学べること whileループカウント
BeginnerLearning-pathLoops
中級

重み付きグリッド上の A* 探索

ゲームやロボットの経路探索を支える A* で、地形コストのグリッドを横切る最安の経路を求めます。

学べること A* 探索ヒューリスティック
GraphsGridsShortest-pathai