摘要: Terminologies about tree height of a node: the longest path from the node to the leaf node left node or external node: the node that has no child inte 阅读全文
posted @ 2024-11-11 17:06 HelenHung 阅读(13) 评论(0) 推荐(0)
摘要: float('-inf') means the negative infinity and is smaller than any given number. how to get json data from api import requests import json r = requests 阅读全文
posted @ 2024-11-03 15:16 HelenHung 阅读(8) 评论(0) 推荐(0)
摘要: How do we transfer an array to a binary tree? we fill with Null if we do not need it when it is necessary. graph TB A((12)) B((4)) C((15)) D((Null)) E 阅读全文
posted @ 2024-10-27 16:17 HelenHung 阅读(7) 评论(0) 推荐(0)
摘要: import itertools iter = itertools.count(start=0, step=1) next(iter) \\ 0 next(iter) \\ 1 next(iter) \\ 2 next(iter) \\ 3 itertools.count() is to gener 阅读全文
posted @ 2024-10-25 16:49 HelenHung 阅读(33) 评论(0) 推荐(0)
摘要: Set up django project step 1: create a folder for project and switch to the folder in terminal. step 2: create a virtual environment: python -m venv v 阅读全文
posted @ 2024-10-22 16:14 HelenHung 阅读(39) 评论(0) 推荐(0)