877 1 分鐘

⭐️⭐️⭐️ # 題目敘述 Given an integer array nums where every element appears three times except for one, which appears exactly once. Find the single element and return it. You must implement a solution with a linear runtime complexity and use only constant extra space. # Example 1 Input: nums =...
1.5k 1 分鐘

⭐️ # 題目敘述 Given two strings s and goal , return true if you can swap two letters in s so the result is equal to goal , otherwise, return false . Swapping letters is defined as taking two indices i and j (0-indexed) such that i != j and swapping the characters at s[i] and s[j] . For example,...
1.3k 1 分鐘

ChienI Kao 筆記網站 JHTNT 筆記網站 # Text Interpolation Using the "Mustache" syntax (double curly braces 兩個大括號 {{ }} ) <p> {{ value }} </p>But Mustaches cannot be used inside HTML attributes. #...
4.4k 4 分鐘

ChienI Kao 筆記網站 JHTNT 筆記網站 # 專案結構 tree /f > structure.txt有整理過的 structure.txtvue-project│ .gitignore│ env.d.ts│ index.html│ output.txt│ package-lock.json│ package.json│ README.md│ tsconfig.app.json│ tsconfig.json│ tsconfig.node.json│ vite.config.ts│ ├─.vscode│ extensions.json│ ├─public│...
490 1 分鐘

ChienI Kao 筆記網站 JHTNT 筆記網站 創建的項目將使用基於 Vite 的構建設置,並允許我們使用 Vue 的單文件組件 (SFC)。 請先確認是否安裝 Node.js,可運用以下指令測試 node -v 。 # 創建 Vue Project npm vue 版本 npm init vue@latest# 設定 Vue Project # 運行 Vue Project 在第一次創建或是更新 package 內容時,記得要輸入 npm install ,安裝內容所需。 npm run dev終端機會出現類似以下的訊息: > [email protected]...
2.2k 2 分鐘

ChienI Kao 筆記網站 JHTNT 筆記網站 先備知識 HTML CSS JavaScript # What is Vue? Evan You 是一名使用 AngularJS 的 Google 員工,於 2013 年開始開發 Vue。 Vue 1.0 版本於 2015 年發布。 Vue(發音為 /vjuː/,如 view)是一個用於構建用戶界面的 JavaScript 框架。 與 Vue 類似的框架有 React 和 Angular,但 Vue 更輕量級,更容易上手。 構建在標準 HTML、CSS 和 JavaScript...
1.4k 1 分鐘

⭐️⭐️⭐️ # 題目敘述 You are given an undirected weighted graph of n nodes (0-indexed), represented by an edge list where edges[i] = [a, b] is an undirected edge connecting the nodes a and b with a probability of success of traversing that edge succProb[i] . Given two nodes start and end , find the path...
1.8k 2 分鐘

⭐️⭐️⭐️ # 題目敘述 You are given two integer arrays nums1 and nums2 sorted in ascending order and an integer k . Define a pair (u, v) which consists of one element from the first array and one element from the second array. Return the k pairs (u1, v1), (u2, v2), ..., (uk, vk) with the smallest sums. #...
3k 3 分鐘

⭐️⭐️⭐️ # 題目敘述 You are given a 0-indexed integer array costs where costs[i] is the cost of hiring the ith worker. You are also given two integers k and candidates . We want to hire exactly k workers according to the following rules: You will run k sessions and hire exactly one worker in each...
1.7k 2 分鐘

⭐️⭐️⭐️⭐️⭐️ # 題目敘述 You are installing a billboard and want it to have the largest height. The billboard will have two steel supports, one on each side. Each steel support must be an equal height. You are given a collection of rods that can be welded together. For example, if you have rods of lengths...