Categories

Post List

1.8k words 2 mins.

# 使用 ssh 連線虛擬機 # 如何查看你的主機 ip 在你的虛擬機輸入以下指令 ifconfig # ssh 連線 開啟你的 Powershell 輸入以下指令 ssh [你的帳號]@[你的主機ip]例如 ssh alen911018@192.168.56.102輸入密碼即連線成功 # Free5GC # 建立 run.sh 檔案 開啟你的 free5gc 虛擬機,輸入以下指令 sudo vim run.sh# 在 vim 中編輯 按下 i,螢幕左下角要顯示 -- INSERT -- 。 打入以下程式碼 (若你是在 Powershell 編輯,可以直接 ctl + c , ctl +...
17k words 16 mins.

# Introduction A macro represent a commonly used group of statements in the source programming language. The macro processor replaces each macro instruction with the corresponding group of source language statements. This is called expanding the macros. When to use macro? Suppose that it is...
5.4k words 5 mins.

# Introduction A loader is a system program that performs the loading function. Many loaders also support relocation and linking. Some systems have a linker to perform the linking operations and a separate loader to handle relocation and loading. In most cases all the program translators (ex....
1.4k words 1 mins.

⭐️⭐️ # 題目敘述 Given a directed acyclic graph, with n vertices numbered from 0 to n - 1 , and an array edges where edges[i] = [fromi, toi] represents a directed edge from node fromi to node toi . Find the smallest set of vertices from which all nodes in the graph are reachable. It’s guaranteed that a...
1.9k words 2 mins.

⭐️⭐️ # 題目敘述 In a linked list of size n , where n is even, the ith node (0-indexed) of the linked list is known as the twin of the (n-1-i)th node, if 0 <= i <= (n / 2) - 1 . For example, if n = 4 , then node 0 is the twin of node 3 , and node 1 is the twin of node 2 . These are the...
946 words 1 mins.

⭐️⭐️ # 題目敘述 Given a linked list, swap every two adjacent nodes and return its head. You must solve the problem without modifying the values in the list’s nodes (i.e., only nodes themselves may be changed.) # Example 1 Input: head = [1,2,3,4] Output: [2,1,4,3] # Example 2 Input: head = [] Output:...
2.1k words 2 mins.

⭐️ # 題目敘述 Given an asyncronous function fn and a time t in milliseconds, return a new time limited version of the input function. A time limited function is a function that is identical to the original unless it takes longer than t milliseconds to fullfill. In that case, it will reject with...
1.2k words 1 mins.

⭐️⭐️ # 題目敘述 You are given the head of a linked list, and an integer k . Return the head of the linked list after swapping the values of the kth node from the beginning and the kth node from the end (the list is 1-indexed). # Example 1 Input: head = [1,2,3,4,5], k = 2 Output: [1,4,3,2,5] # Example...
771 words 1 mins.

⭐️ # 題目敘述 Given a positive integer millis , write an asyncronous function that sleeps for millis milliseconds. It can resolve any value. # Example 1 Input: millis = 100 Output: 100 Explanation: It should return a promise that resolves after 100ms. let t = Date.now(); sleep(100).then(() =>...
1.8k words 2 mins.

⭐️⭐️ # 題目敘述 Given a function fn , return a curried version of that function. A curried function is a function that accepts fewer or an equal number of parameters as the original function and returns either another curried function or the same value the original function would have returned. In...