30讀書會

@30life-algorithm

一群超過30歲,卻努力不懈的人

Public team

Joined on Sep 24, 2022

  • 目標 階段一:閱讀官方文件 階段二:閱讀人工智慧書籍,並使用mojo實現小模型 階段三:使用大型資料集,製作Side Project 階段一 https://docs.modular.com/mojo/manual/ 每週開會 限時30分鐘內結束 翻譯官方文件
     Like  Bookmark
  • 260. Single Number III Question Given an integer array <mark>nums</mark>, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two elements that appear only once. You can return the answer in any order. You must write an algorithm that runs in linear runtime complexity and uses only constant extra space. Hand in homework before Saturday. :::success Roger的作業 xander的作業
     Like  Bookmark
  • Why we care? 算力不是免費的。 本課程作業速度不到標準,也會被退件。 名詞定義 Definition 1. Problem 問題 會有明確的Input與Output Ex. 冠軍問題
     Like 1 Bookmark
  • 使用markdown 協作筆記 每週輪流分享 讀書會討論時間長度(一個小時為限) 一個人15分鐘。 每週六晚上十點 Video 解答解說影片 Feis Studio LeedCode List LeetCode
     Like  Bookmark
  • 79. Word Search Question Given an <mark>$m \ \text{ x } \ n$</mark> grid of characters <mark>board</mark> and a string <mark>word</mark>, return <mark>true</mark> if <mark>word</mark> exists in the grid. The word can be constructed from letters of sequentially adjacent cells, where adjacent cells are horizontally or vertically neighboring. The same letter cell may not be used more than once. Hand in homework before Saturday. :::success Roger的作業 xander的作業
     Like  Bookmark
  • 154. Find Minimum in Rotated Sorted Array II Question Suppose an array of length <mark>$n$</mark> sorted in ascending order is rotated between <mark>$1$</mark> and <mark>$n$</mark> times. For example, the array <mark>nums = $[0,1,4,4,5,6,7]$</mark> might become: <mark>$[4,5,6,7,0,1,4]$</mark> if it was rotated <mark>$4$</mark> times. <mark>$[0,1,4,4,5,6,7]$</mark> if it was rotated <mark>$7$</mark> times. Notice that rotating an array <mark>$[a[0], a[1], a[2], ..., a[n-1]]$</mark> 1 time results in the array <mark>$[a[n-1], a[0], a[1], a[2], ..., a[n-2]]$</mark>. Given the sorted rotated array <mark>nums</mark> that may contain duplicates, return the minimum element of this array.
     Like  Bookmark
  • 題目: Given two integer arrays inorder and postorder where inorder is the inorder traversal of a binary tree and postorder is the postorder traversal of the same tree, construct and return the binary tree. Constraints: 1 <= inorder.length <= 3000 postorder.length == inorder.length 3000 <= inorder[i], postorder[i] <= 3000 inorder and postorder consist of unique values. Each value of postorder also appears in inorder. inorder is guaranteed to be the inorder traversal of the tree.
     Like  Bookmark
  • 67. Add Binary Question Given two binary strings <mark>a</mark> and <mark>b</mark>, return their sum as a binary string. Hand in homework before Saturday. :::success woody的作業 Roger的作業 Allen的作業 xander的作業
     Like  Bookmark
  • 347. Top K Frequent Elements Question Given an integer array <mark>$nums$</mark> and an integer <mark>$k$</mark>, return the <mark>$k$</mark> most frequent elements. You may return the answer in any order. Constraints: $1 <= nums.length <= 105$ $-104 <= nums[i] <= 104$ <mark>$k$</mark> is in the range <mark>[1, the number of unique elements in the array]</mark>. It is guaranteed that the answer is unique.
     Like  Bookmark
  • 151. Reverse Words in a String Question Given an input string <mark>s</mark>, reverse the order of the words. A word is defined as a sequence of non-space characters. The words in <mark>s</mark> will be separated by at least one space. Return a string of the words in reverse order concatenated by a single space. Note that <mark>s</mark> may contain leading or trailing spaces or multiple spaces between two words. The returned string should only have a single space separating the words. Do not include any extra spaces.
     Like  Bookmark
  • 190. Reverse Bits Question Reverse bits of a given 32 bits unsigned integer. Note: Note that in some languages, such as Java, there is no unsigned integer type. In this case, both input and output will be given as a signed integer type. They should not affect your implementation, as the integer's internal binary representation is the same, whether it is signed or unsigned. In Java, the compiler represents the signed integers using 2's complement notation. Therefore, in Example 2 above, the input represents the signed integer <mark>-3</mark> and the output represents the signed integer <mark>-1073741825</mark>. Hand in homework before Saturday.
     Like  Bookmark
  • 78. Subsets Question Given an integer array <mark>$nums$</mark> of unique elements, return all possible subsets (the power set). The solution set must not contain duplicate subsets. Return the solution in any order. Hand in homework before Saturday. :::success Woody的作業 Roger的作業
     Like  Bookmark
  • 題目 Given an integer array nums of unique elements, return all possible subsets(the power set). The solution set must not contain duplicate subsets. Return the solution in any order. Constraints: 1 <= nums.length <= 10 -10 <= nums[i] <= 10 All the numbers of nums are unique.
     Like  Bookmark
  • 15. 3Sum Question Given an integer array nums, return all the triplets <mark>$[;nums[i],; nums[j],; nums[k];]$</mark> such that <mark>$i \neq j$</mark>, <mark>$i \neq k$</mark>, and <mark>$j \neq k$</mark>, and <mark>$nums[i] + nums[j] + nums[k] == 0$</mark>. Notice that the solution set must not contain duplicate triplets. Hand in homework before Saturday. :::success Woody的作業 Allen的作業
     Like  Bookmark
  • 441. Arranging Coins Question You have $n$ coins and you want to build a staircase with these coins. The staircase consists of $k$ rows where the ith row has exactly $i$ coins. The last row of the staircase may be incomplete. Given the integer $n$, return the number of complete rows of the staircase you will build. Hand in homework before Saturday. :::success Andy的作業 Allen的作業
     Like  Bookmark
  • 264. Ugly Number II Question An ugly number is a positive integer whose prime factors are limited to <mark>$2$</mark>, <mark>$3$</mark>, and <mark>$5$</mark>. Given an integer <mark>$n$</mark>, return the <mark>$n^{th}$</mark> ugly number. Hand in homework before Saturday. :::success Roger的作業 Leo的作業
     Like  Bookmark
  • 題目 Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums[j] + nums[k] == 0. Notice that the solution set must not contain duplicate triplets. 3 <= nums.length <= 3000 -105 <= nums[i] <= 105 思路 題目two sum衍伸過來的, 可以先拿來練習一下
     Like  Bookmark
  • 題目:Given the root of a binary tree, return the bottom-up level order traversal of its nodes' values . (i.e., from left to right, level by level from leaf to root). Constraints: The number of nodes in the tree is in the range [0, 2000]. 1000 <= Node.val <= 1000 先搞懂題目的意思才能開始解題
     Like  Bookmark
  • 題目: There are 8 prison cells in a row and each cell is either occupied or vacant. Each day, whether the cell is occupied or vacant changes according to the following rules: If a cell has two adjacent neighbors that are both occupied or both vacant, then the cell becomes occupied. Otherwise, it becomes vacant. Note that because the prison is a row, the first and the last cells in the row can't have two adjacent neighbors.
     Like  Bookmark
  • 題目 You have n coins and you want to build a staircase with these coins. The staircase consists of k rows where the ith row has exactly i coins. The last row of the staircase may be incomplete. Given the integer n, return the number of complete rows of the staircase you will build. #Example 1: Input: n = 5 Output: 2
     Like  Bookmark