hankluo6

@hankluo6

Joined on Sep 9, 2020

  • Optimized QuickSort GitHub // quickSort // // This public-domain C implementation by Darel Rex Finley. // // * Returns YES if sort was successful, or NO if the nested // pivots went too deep, in which case your array will have // been re-ordered, but probably not sorted correctly.
     Like  Bookmark
  • contributed by < hankluo6 > GitHub 取得測量資料 commit 1d9afc 使用 dev_read 做排序,並透過 copy_to_user 回傳執行時間 static ssize_t dev_read(struct file *filep,
     Like  Bookmark
  • contributed by < hankluo6 > 第 5 週測驗題 測驗 1 程式原理 static ull isqrt(ull x) { if (x == 0) return 0;
     Like  Bookmark
  • contributed by < hankluo6 > 第 6 週測驗題 測驗 1 程式原理 /** * @brief Node in the TCB of the thread */ typedef struct __node {
     Like  Bookmark
  • contributed by < hankluo6 > kecho 傳遞參數到核心模組 insmod 最後會呼叫到 load_module,在 load_module 中會先透過 find_module_sections 設置 module 的指標到對應的 section,接著 parse_args 便能將對應的參數寫入。 static int find_module_sections(struct module *mod, struct load_info *info) { mod->kp = section_objs(info, "__param", sizeof(*mod->kp), &mod->num_kp);
     Like  Bookmark
  • contributed by < hankluo6 > :::spoiler 參考解答 MMM = 1 NNN = 2 WWW = wake_up_interruptible_poll ZZZ = 10 :::
     Like 1 Bookmark
  • contributed by < hankluo6 > GitHub 2021-04-06 第 7 週測驗題 Problem 1 /* Recursively run right-most part of the command line printing output to the
     Like  Bookmark
  • contributed by < hankluo6 > 第 8 週測驗題 測驗 1 程式原理 void *memchr_opt(const void *src_void, int c, size_t length) { ...
     Like  Bookmark
  • contributed by < hankluo6 > 第 1 週測驗題 解題思路 LLL [x] (c) left = &((*left)->next) 從函式名稱 list_concat 可知應為將兩個 list 做 concatenation,LLL 為在迴圈內尋找 list 的尾端,且 left 的型態為 node_t **,為 node pointer 的 "address",故答案為 &((left)->next。
     Like 2 Bookmark
  • contributed by < hankluo6 > 環境 macOS Monterey 12.2 Apple M1 Linux lima-default 5.15.0-25-generi Per-CPU Tcmalloc & Per-thread Tcmalloc 安裝 Bazel
     Like  Bookmark
  • 測驗 1 void *memchr_opt(const void *src_void, int c, size_t length) { ... if (!TOO_SMALL(length)) { ... while (length >= LBLOCKSIZE) { /* XXXXX: Your implementation should appear here */
     Like  Bookmark
  • contributed by < hankluo6 > 第 4 週測驗題 測驗 1 運作原理 int ceil_log2(uint32_t x) { uint32_t r, shift;
     Like  Bookmark
  • contributed by < hankluo6 > 第 3 週測驗題 測驗 1 運作原理 #define GENMASK(h, l) \ (((~0UL) >> (LEFT)) & ((~0UL) >> (l) << (RIGHT))) (~0UL) >> (LEFT) 將所有 bit 向右移,所以其 MSB 數來 bit 為 0 的數目與 LEFT 相等。可推出 (~0UL) >> (l) << (RIGHT) 需將從 LSB 數來的 bit 設為 0。
     Like  Bookmark
  • contributed by < hankluo6 > 第 2 週測驗題 測驗 1 運作原理 將兩數 $x, y$ 分成,整數部分及小數部分: $$ \begin{equation}
     Like  Bookmark
  • contributed by < hankluo6 > 第 1 週測驗題 測驗 1 運作原理 void map_add(map_t *map, int key, void *data) { struct hash_key *kn = find_key(map, key); if (kn)
     Like  Bookmark
  • contributed by < hankluo6 > 延續 2020q3 Homework1(lab0), 2021q1 Homework1(lab0) 的開發 GitHub 環境 $ gcc --version gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
     Like  Bookmark
  • [interviewee] Move Zero To End Question description Given a static-sized array of integers arr, move all zeroes in the array to the end of the array. You should preserve the relative order of items in the array. We should implement a solution that is more efficient than a naive brute force. Examples: input: arr = [1, 10, 0, 2, 8, 3, 0, 0, 6, 4, 0, 5, 7, 0] output: [1, 10, 2, 8, 3, 6, 4, 5, 7, 0, 0, 0, 0, 0]
     Like  Bookmark
  • Background Linux System Programming Computer Vision Deep Learning 相關職缺 Google Software Engineer, Machine Learning, Pixel Test
     Like  Bookmark
  • 簡介對其他同學的批評 齋羅 Zxiro 寫程式時有表達想法 有些表達不清楚或太冗長 沒有 REACTO 中的 TEST 需考慮 edge case 高爾夫-Golf
     Like  Bookmark
  • 自評-面試過程 講話不清楚、聲音太小聲 滑鼠一直晃動,影響注意力 英文不通順且口齒不清,用字不精準 多跟 interviewer 確認是否完全瞭解題目並多舉幾個例子,幫助自己整理思緒 驗證程式碼時要有系統的講解,並舉出更多例子 (e.g edge case) 輔助 自評-程式部分
     Like  Bookmark