LiChiiiii

@LiChiiiii

Joined on Oct 21, 2022

  • contributed by < LiChiiiii> 測驗題目:quiz3 測驗一 紅黑樹 研讀 treesort.c ,考慮一個 Tree sort 的實作,搭配 Red–black tree 作為排序所需的自我平衡樹。 定義一個列舉型別 color_t ,包含兩個值,分別為 CMAP_RED 與 CMAP_BLACK,代表紅色節點和黑色節點。 typedef enum { CMAP_RED = 0, CMAP_BLACK } color_t;
     Like  Bookmark
  • contributed by < LiChiiiii > 開發環境 $ gcc --version gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0 Copyright (C) 2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ lscpu
     Like  Bookmark
  • contributed by < LiChiiiii > 測驗題目:quiz4 測驗一 在測驗一提供的程式碼中定義 typedef rb_tree(node_t) tree_t; rb_gen(static, tree_, tree_t, node_t, link, node_cmp); 對照 rb.h 之巨集的使用,展開 rb_gen(static, ex_, ex_t, ex_node_t, ex_link, ex_cmp) 巨集可以得到插入、刪除等功能之函式。
     Like  Bookmark
  • contributed by < LiChiiiii > 題目 - L04: fibdrv :::spoiler 開發環境 $ gcc --version gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0 Copyright (C) 2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
     Like  Bookmark
  • contributed by < LiChiiiii> 測驗題目:quiz2 測驗一 運作原理 考慮 next_pow2 可針對給定無號 64 位元數值 x,找出最接近且大於等於 2 的冪的值,例如: next_pow2(7) = 8 next_pow2(13) = 16
     Like  Bookmark