mirror of
https://github.com/krahets/hello-algo.git
synced 2025-11-05 06:37:12 +08:00
docs: add Japanese translate documents (#1812)
* docs: add Japanese documents (`ja/docs`) * docs: add Japanese documents (`ja/codes`) * docs: add Japanese documents * Remove pythontutor blocks in ja/ * Add an empty at the end of each markdown file. * Add the missing figures (use the English version temporarily). * Add index.md for Japanese version. * Add index.html for Japanese version. * Add missing index.assets * Fix backtracking_algorithm.md for Japanese version. * Add avatar_eltociear.jpg. Fix image links on the Japanese landing page. * Add the Japanese banner. --------- Co-authored-by: krahets <krahets@163.com>
This commit is contained in:
committed by
GitHub
parent
2487a27036
commit
954c45864b
20
ja/codes/python/modules/vertex.py
Normal file
20
ja/codes/python/modules/vertex.py
Normal file
@ -0,0 +1,20 @@
|
||||
# File: vertex.py
|
||||
# Created Time: 2023-02-23
|
||||
# Author: krahets (krahets@163.com)
|
||||
|
||||
|
||||
class Vertex:
|
||||
"""頂点クラス"""
|
||||
|
||||
def __init__(self, val: int):
|
||||
self.val = val
|
||||
|
||||
|
||||
def vals_to_vets(vals: list[int]) -> list["Vertex"]:
|
||||
"""値のリストvalsを入力し、頂点のリストvetsを返す"""
|
||||
return [Vertex(val) for val in vals]
|
||||
|
||||
|
||||
def vets_to_vals(vets: list["Vertex"]) -> list[int]:
|
||||
"""頂点のリストvetsを入力し、値のリストvalsを返す"""
|
||||
return [vet.val for vet in vets]
|
||||
Reference in New Issue
Block a user