1189. Maximum Number of Balloons - Easy 前往題目 想法 用hashmap紀錄頻率 疊代balloon直到遇到字母數量為0或是null 思路Code自己的解 class Solution { public int maxNumberOfBalloons(String text) { Map<Character, Integer> map = new HashMap(); 2024-05-10 Leetcode > Easy #Leetcode #心得 #String #Hash Table #Counting
58. Length of Last Word - Easy 前往題目 想法 trim前後 雙指針直到最後一個word 思路雖然自己寫出來了,但看了neetcode大大的解法覺得更好 從後面開始,跳過所有空格 遇到字之後繼續往前並紀錄走過幾個字 再次遇到空格時就是完成紀錄,直接回傳字數 Code自己寫的部分,用到trim然後把每個字都走過一遍直到最後一個 class Solution { public int lengthOfLas 2024-05-09 Leetcode > Easy #Leetcode #心得 #String
205. Isomorphic Strings - Easy 前往題目 思路 把s和t位置相對應的字符的位置存起來 如果存起來的位置不符,就代表沒辦法直接替換 位置都相符就代表可以直接替換 我覺得可以理解為,同樣位置的要視為同一個字符,所以一種字符不能有兩種位置 Codeclass Solution { public boolean isIsomorphic(String s, String t) { int[ 2024-05-08 Leetcode > Easy #Leetcode #心得 #String #Hash Table
392. Is Subsequence - Easy 前往題目 想法 用for loop 思路 看了解題思路恍然大悟,2 pointers就能完美解決 Codeclass Solution { public boolean isSubsequence(String s, String t) { int sP = 0; // s pointer int tP = 0; // t poin 2024-05-08 Leetcode > Easy #Leetcode #心得 #String #Two Pointers #Dynamic Programming
尚品甄選電商SpringBoot-Web開發3權限管理之選單管理 目標 選單管理 選單需求和表結構 選單管理CRUD操作介面 選單管理CRUD前端 為角色分配選單 需求分析 介面 搜尋所有選單和角色分配選單id列表 儲存角色分配的選單數據 前端 動態選單 需求分析 介面 搜尋當前登入用戶可以操作的選單 前端 選單管理選單需求和表結構選單中的數據會有層級關係例如: 權限管理 用戶管理 角色管理 選單管理 訂單管理 訂單列表 那在資 2024-05-01 Project > SpringBoot #SpringBoot #Vue #MyBatis #Element-plus
9個給工程師的部落格 Netflix TechBlog 雲端計算 Chaos Monkey - a software tool Netflix engineers developed to test the resiliency and recoverability of its Amazon Web Services (AWS) infrastructure. Uber Blog 機器學習 AI 需求預測 動態 2024-04-27 綜合 #實用網站 #Cloud Computing #Machine Learning #Platform Details #CDN and DDoS Protection Details #Architecture and Patterns
尚品甄選電商SpringBoot-Web開發2用戶權限管理 目標 用戶管理需求和準備 用戶管理api 添加 修改 刪除 用戶管理前端 用戶頭像 minIO伺服器 上傳檔案 上傳檔案前端 為用戶分配角色 需求 API 整合前端 用戶條件分頁查詢API 一樣是透過controller -> service -> mapper拿到資料list後再回傳給前端 // 用戶條件分頁查詢介面 @GetMapping(value = "/fin 2024-04-22 Project > SpringBoot #SpringBoot #Vue #MyBatis #Element-plus
尚品甄選電商SpringBoot-Web開發之用戶登入與角色管理 相關資源尚品甄選教程 官方資料(百度網盤) SSM教程 網友整理的完整程式碼 後端程式碼 前端程式碼 前置作業使用開源模板 vue3 和 element-plus UI 框架,vite 建構工具、pinia 狀態管理、vue-router 路由管理、mockjs 數據模擬,並整合了 typescript,功能由 Vue Element Admin 移植而来。 使用node 16.9.0 R 2024-04-17 Project > SpringBoot #SpringBoot #Vue #MyBatis #Element-plus
230. Kth Smallest Element in a BST - Medium 前往題目 之前寫的文章 想法 用priority queue,取最小的前k個 思路仔細觀察會發現這題的數字用inorder的方式traverse剛好會排成ascending的樣子 簡單來說就是,往左邊走就對了,沒有的話就pop,最後才走右邊 借助stack的力量 只要有左邊的node就push到stack,然後前往left node 如果沒有左邊了就pop,然後前往right node 沒有 2024-04-12 Leetcode > Medium #Leetcode #心得 #Binary Search Tree #Binary Tree #Depth-First Search #Tree
621. Task Scheduler - Medium 前往題目 之前寫的文章 有難度的一題 思路很重要的觀念是task的頻率由大到小,每次取前n個來排,也就是說假設今天是n=2,然後有A出現5次,B出現3次,C出現1次,那就是取AB,然後A和B各減1。這樣可以保證最少次數的Idle,不然先把小頻率的都取完了,之後為了滿足條件就必須每次都放n — 1個Idle,就不是最小單位時間了 priority queue(pq)來儲存每個task的頻率,由大 2024-04-10 Leetcode > Medium #Leetcode #心得 #Array #Greedy #Hash Table #Sorting #Heap (Priority Queue) #Counting