原创 LeetCode實戰:合併兩個有序數組

題目英文 Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. Note: The number

原创 LeetCode實戰:格雷編碼

背景 爲什麼你要加入一個技術團隊? 如何加入 LSGO 軟件技術團隊? 我是如何組織“算法刻意練習活動”的? 爲什麼要求團隊的學生們寫技術Blog 題目英文 The gray code is a binary numeral

原创 LeetCode實戰:子集

題目英文 Given a set of distinct integers, nums, return all possible subsets (the power set). Note: The solution set mu

原创 LeetCode實戰:Nim 遊戲

背景 爲什麼你要加入一個技術團隊? 如何加入 LSGO 軟件技術團隊? 我是如何組織“算法刻意練習活動”的? 爲什麼要求團隊的學生們寫技術Blog 題目英文 You are playing the following Nim

原创 我是如何組織“算法刻意練習活動”的?

背景 在上個學期末,我們組織了一次團隊的招新活動 – 如何加入 LSGO 軟件技術團隊?。 我們讓預加入團隊的同學在假期中完成以下兩個任務之一: 學習 C# 語言: https://www.bilibili.com/video/

原创 LeetCode實戰:買賣股票的最佳時機

背景 爲什麼你要加入一個技術團隊? 如何加入 LSGO 軟件技術團隊? 我是如何組織“算法刻意練習活動”的? 爲什麼要求團隊的學生們寫技術Blog 題目英文 Say you have an array for which t

原创 LeetCode實戰:不同路徑

題目英文 A robot is located at the top-left corner of a m x n grid (marked ‘Start’ in the diagram below). The robot can

原创 LeetCode實戰:螺旋矩陣 II

題目英文 Given a positive integer n, generate a square matrix filled with elements from 1 to n^2 in spiral order. Examp

原创 LeetCode實戰:螺旋矩陣

題目英文 Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order. Examp

原创 LeetCode實戰:買賣股票的最佳時機 II

背景 爲什麼你要加入一個技術團隊? 如何加入 LSGO 軟件技術團隊? 我是如何組織“算法刻意練習活動”的? 爲什麼要求團隊的學生們寫技術Blog 題目英文 Say you have an array for which t

原创 LeetCode實戰:全排列

題目英文 Given a collection of distinct integers, return all possible permutations. Example: Input: [1,2,3] Output: [

原创 LeetCode實戰:字符串相乘

題目英文 Given two non-negative integers num1 and num2 represented as strings, return the product of num1 and num2, als

原创 LeetCode實戰:字符串相加

題目英文 Given two non-negative integers num1 and num2 represented as string, return the sum of num1 and num2. Note: T

原创 LeetCode實戰:搜索旋轉排序數組

題目英文 Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [0,1,2,4

原创 LeetCode實戰:刪除排序數組中的重複項

題目英文 Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return t