1.1k 1 分鐘

⭐️ # 題目敘述 The XOR total of an array is defined as the bitwise XOR of all its elements, or 0 if the array is empty. For example, the XOR total of the array [2,5,6] is 2 XOR 5 XOR 6 = 1 . Given an array nums , return the sum of all XOR totals for every subset of nums . Note: Subsets with the same...
3k 3 分鐘

# 安裝 C++ 等套件 sudo apt install build-essential# 安裝 java 默認 JRE/JDK # 更新包sudo apt update# 檢查 java 是否已經安裝過java --version# 安裝默認 JREsudo apt install default-jre# 安裝默認 JDKsudo apt install default-jdk# 檢查 javac,java 編譯器版本javac --version# GPU 環境安裝 (在虛擬環境上的做法) RTX 3090 on Ubuntu 22.04.4 LTS + anaconda # 安裝...
1.2k 1 分鐘

⭐️⭐️⭐️ # 題目敘述 You are given the root of a binary tree with n nodes where each node in the tree has node.val coins. There are n coins in total throughout the whole tree. In one move, we may choose two adjacent nodes and move one coin from one node to another. A move may be from parent to child, or...
1.5k 1 分鐘

⭐️ # 題目敘述 You are given the root of a full binary tree with the following properties: Leaf nodes have either the value 0 or 1 , where 0 represents False and 1 represents True . Non-leaf nodes have either the value 2 or 3 , where 2 represents the boolean OR and 3 represents the boolean AND . The...
1.2k 1 分鐘

# 製作開機機碟 可以看官方提供的文件 Create a bootable USB stick with Rufus on Windows # 需要的東西 一個 4GB 以上的隨身碟 (空的或格式化過的) Windows 作業系統 Rufus 軟體,a free and open source USB stick writing tool Ubuntu ISO file 到 ubuntu 的官網下載 ISO 檔 Ubuntu 22.04.4 LTS 安裝 Rufus 插入 USB 隨身碟 Rufus 將更新,在設備欄位中設定設備 # 安裝單一系統 製作開機碟 /...
1.1k 1 分鐘

⭐️⭐️⭐️ # 題目敘述 You are given an m x n binary matrix grid . A move consists of choosing any row or column and toggling each value in that row or column (i.e., changing all 0 's to 1 's, and all 1 's to 0 's). Every row of the matrix is interpreted as a binary number, and the score of...
1.6k 1 分鐘

⭐️ # 題目敘述 You are given an integer array score of size n , where score[i] is the score of the ith athlete in a competition. All the scores are guaranteed to be unique. The athletes are placed based on their scores, where the 1st place athlete has the highest score, the 2nd place athlete has the 2nd...
1.2k 1 分鐘

⭐️⭐️⭐️ # 題目敘述 You are given the head of a non-empty linked list representing a non-negative integer without leading zeroes. Return the head of the linked list after doubling it. # Example 1 Input: head = [1,8,9] Output: [3,7,8] Explanation: The figure above corresponds to the given linked list...
1.2k 1 分鐘

⭐️⭐️⭐️ # 題目敘述 You are given the head of a linked list. Remove every node which has a node with a greater value anywhere to the right side of it. Return the head of the modified linked list. # Example 1 Input: head = [5,2,13,3,8] Output: [13,8] Explanation: The nodes that should be removed are 5, 2...