黃士昕

@tony268596

Joined on Jul 4, 2022

  • contributed by < vestata > 開發環境 $ gcc --version gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0 $ lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Address sizes: 46 bits physical, 48 bits virtual Byte Order: Little Endian
     Like  Bookmark
  • contributed by < vestata >
     Like  Bookmark
  • contributed < vestata > Problem B in Quiz1 C code fp32_to_bf16 static inline bf16_t fp32_to_bf16(float s) { bf16_t h; union {
     Like  Bookmark
  • contributed by < vestata > 介紹 此專案源自於 jserv 的 Linux 核心實作 2024q1 第 9 週測驗題 ,有關以下之探討是否可以更加發揮硬體性能已加速矩陣相乘。 目標 預計會完成以下討論: [ ] 以 CMWQ 重寫,並針對批次的矩陣乘法運算,提出有效的存取模型 [x] 在 GitHub 找出矩陣乘法相關專案,如 matmul, matmul-bench, matmul-cpu, libxsmm, Matrix_Multiply_using_Arm_Neon_and_Avx,並進行效能比較和實作分析,從而歸納出提升矩陣乘法的手法
     Like  Bookmark
  • Description Given a non-negative integer c, decide whether there're two integers a and b such that a2 + b2 = c. Examples Example 1: Input: c = 5 Output: true Explanation: 1 * 1 + 2 * 2 = 5 Example 2:
     Like  Bookmark
  • Lab01 環境建置 Lab02 code 小知識 Lab03 LED Lab04 Buzzer Lab05 DHT11 Lab06 超音波距離感測 Lab07 聲音感測 Lab08 opencv、虛擬環境、colab大雜燴 Lab09 Yolo Lab10 四位元七段顯示器
     Like  Bookmark
  • contributed by < vestata > 測驗題改進 選擇三題進行改進。 1. 第四周測驗題 Q2 預計: [ ] 補完之前缺失的 lab0-c 之 ttt[x] 完成 coroutine 並行 [ ] 鍵盤事件
     Like  Bookmark
  • Description You are given an array happiness of length n, and a positive integer k. There are n children standing in a queue, where the ith child has happiness value happiness[i]. You want to select k children from these n children in k turns. In each turn, when you select a child, the happiness value of all the children that have not been selected till now decreases by 1. Note that the happiness value cannot become negative and gets decremented only if it is positive. Return the maximum sum of the happiness values of the selected children you can achieve by selecting k children. Examples
     Like  Bookmark
  • Description 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. Examples Example 1: image Input: head = [1,8,9]
     Like  Bookmark
  • Description 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. Examples Example 1: image
     Like  Bookmark
  • contributed by < vestata > 實驗環境 $ gcc --version gcc (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0 $ lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Address sizes: 46 bits physical, 48 bits virtual Byte Order: Little Endian
     Like  Bookmark
  • Description Given a 0-indexed string word and a character ch, reverse the segment of word that starts at index 0 and ends at the index of the first occurrence of ch (inclusive). If the character ch does not exist in word, do nothing. For example, if word = "abcdefd" and ch = "d", then you should reverse the segment that starts at 0 and ends at 3 (inclusive). The resulting string will be "dcbaefd". Return the resulting string. Example Example 1: Input: word = "abcdefd", ch = "d"
     Like  Bookmark
  • Description Given an n x n integer matrix grid, return the minimum sum of a falling path with non-zero shifts. A falling path with non-zero shifts is a choice of exactly one element from each row of grid such that no two elements chosen in adjacent rows are in the same column. Example Example1 image Input: grid = [[1,2,3],[4,5,6],[7,8,9]]
     Like  Bookmark
  • Description The Tribonacci sequence Tn is defined as follows: T0 = 0, T1 = 1, T2 = 1, and Tn+3 = Tn + Tn+1 + Tn+2 for n >= 0. Given n, return the value of Tn. Example Example 1: Input: n = 4
     Like  Bookmark
  • Description You have a lock in front of you with 4 circular wheels. Each wheel has 10 slots: '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'. The wheels can rotate freely and wrap around: for example we can turn '9' to be '0', or '0' to be '9'. Each move consists of turning one wheel one slot. The lock initially starts at '0000', a string representing the state of the 4 wheels. You are given a list of deadends dead ends, meaning if the lock displays any of these codes, the wheels of the lock will stop turning and you will be unable to open it. Given a target representing the value of the wheels that will unlock the lock, return the minimum total number of turns required to open the lock, or -1 if it is impossible. Examples
     Like  Bookmark
  • Description You are given a 0-indexed m x n binary matrix land where a 0 represents a hectare of forested land and a 1 represents a hectare of farmland. To keep the land organized, there are designated rectangular areas of hectares that consist entirely of farmland. These rectangular areas are called groups. No two groups are adjacent, meaning farmland in one group is not four-directionally adjacent to another farmland in a different group. land can be represented by a coordinate system where the top left corner of land is (0, 0) and the bottom right corner of land is (m-1, n-1). Find the coordinates of the top left and bottom right corner of each group of farmland. A group of farmland with a top left corner at (r1, c1) and a bottom right corner at (r2, c2) is represented by the 4-length array [r1, c1, r2, c2]. Return a 2D array containing the 4-length arrays described above for each group of farmland in land. If there are no groups of farmland, return an empty array. You may return the answer in any order. Example
     Like  Bookmark
  • Description Given an m x n 2D binary grid grid which represents a map of '1's (land) and '0's (water), return the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assume all four edges of the grid are all surrounded by water. Examples Example 1: Input: grid = [ ["1","1","1","1","0"], ["1","1","0","1","0"],
     Like  Bookmark
  • contributed by < vestata > Reviewed by Vincent550102 善用已存在的巨集,如 list_for_each,以 q_swap 為例。 void q_swap(struct list_head *head) { // https://leetcode.com/problems/swap-nodes-in-pairs/ if (!head || list_empty(head)) return;
     Like  Bookmark
  • Description You are given row x col grid representing a map where grid[i][j] = 1 represents land and grid[i][j] = 0 represents water. Grid cells are connected horizontally/vertically (not diagonally). The grid is completely surrounded by water, and there is exactly one island (i.e., one or more connected land cells). The island doesn't have "lakes", meaning the water inside isn't connected to the water around the island. One cell is a square with side length 1. The grid is rectangular, width and height don't exceed 100. Determine the perimeter of the island. Example 1: image
     Like  Bookmark
  • Description You are given the root of a binary tree where each node has a value in the range [0, 25] representing the letters 'a' to 'z'. Return the lexicographically smallest string that starts at a leaf of this tree and ends at the root. As a reminder, any shorter prefix of a string is lexicographically smaller. For example, "ab" is lexicographically smaller than "aba". A leaf of a node is a node that has no children.
     Like  Bookmark