leetcode with python:225. Implement Stack using Queues

题目: Implement a last-in-first-out (LIFO) stack using only two queues. The implemented stack should support all the functions of a normal stack (push, top, pop, and empty). Implement the MyStack cla
我...也想成为火箭队(6) - 纪录自己的学习 (W3C jQuery、MDN物件、非同步)

2021/06 jQuery来讲我没有学的很多,大概做了一个Jennifer Dewalt第五天的作品(详见本系列第3集),以伟人名言做设计。 这阶段主要知道怎么操控网页元素、做一
Day [4] — this:指定物件 — JS之浸猪笼系列

Day [4] — this:指定物件 — JS之浸猪笼系列 我们在前面几章知道 this 会依据呼叫方式印出不同结果,那如果我们希望可以存取 this 的某个特定内容呢?要指
leetcode with python:226. Invert Binary Tree

题目: Given the root of a binary tree, invert the tree, and return its root. 给定一棵二元树,将其左右反转后回传 透过简单的递迴,这题不算太难 # Definition for a binary tree
leetcode with python:228. Summary Ranges

题目: You are given a sorted unique integer array nums. A range [a,b] is the set of all integers from a to b (inclusive). Return the smallest sorted list of ranges that cover all the numbers in the a
leetcode with python:231. Power of Two

题目: Given an integer n, return true if it is a power of two. Otherwise, return false. An integer n is a power of two, if there exists an integer x such that n == 2^x. 给定一数,判断它是否是
在 Ubuntu 使用 Intel GPU 遇到垂直显示模式下的萤幕撕裂问题

当画面捲动而萤幕出现撕裂感的时候,载入 dri3 并加入相关参数,可以解决 Intel GPU 的显示问题。 $sudo nano /etc/X11/xorg.conf.d/20-intel.conf Section Module Load dri3 E
leetcode with python:232. Implement Queue using Stacks

题目: Implement a first in first out (FIFO) queue using only two stacks. The implemented queue should support all the functions of a normal queue (push, peek, pop, and empty). Implement the MyQueue c
leetcode with python:234. Palindrome Linked List

题目: Given the head of a singly linked list, return true if it is a palindrome. 给定一个linked list,判断它是否对称 这题我并没有什么头绪,于是採取了最笨的做法 # Definiti
leetcode with python:235. Lowest Common Ancestor of a Binary

题目: Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST. 给定一个binary search tree和其中两个Node,找出两个Node的最近共同祖先 这题
leetcode with python:237. Delete Node in a Linked List

题目: Write a function to delete a node in a singly-linked list. You will not be given access to the head of the list, instead you will be given access to the node to be deleted directly. It is guara