2.1k 2 分鐘

⭐️⭐️⭐️ # 題目敘述 There are some spherical balloons taped onto a flat wall that represents the XY-plane. The balloons are represented as a 2D integer array points where points[i] = [xstart, xend] denotes a balloon whose horizontal diameter stretches between xstart and xend . You do not know the exact...
2.1k 2 分鐘

⭐️⭐️ # 題目敘述 You are given an array of non-overlapping intervals intervals where intervals[i] = [starti, endi] represent the start and the end of the ith interval and intervals is sorted in ascending order by starti . You are also given an interval newInterval = [start, end] that represents the start...
823 1 分鐘

⭐️ # 題目敘述 Given a binary array nums , return the maximum length of a contiguous subarray with an equal number of 0 and 1 . # Example 1 Input: nums = [0,1] Output: 2 Explanation: [0, 1] is the longest contiguous subarray with an equal number of 0 and 1. # Example 2 Input: nums = [0,1,0] Output:...
791 1 分鐘

⭐️⭐️ # 題目敘述 Given an integer array nums , return an array answer such that answer[i] is equal to the product of all the elements of nums except nums[i] . The product of any prefix or suffix of nums is guaranteed to fit in a 32-bit integer. You must write an algorithm that runs in O(n) time and...
808 1 分鐘

⭐️⭐️⭐️ # 題目敘述 Given a binary array nums and an integer goal , return the number of non-empty subarrays with a sum goal . A subarray is a contiguous part of the array. # Example 1 Input: nums = [1,0,1,0,1], goal = 2 Output: 4 Explanation: The 4 subarrays are bolded and underlined...
1.4k 1 分鐘

⭐️⭐️⭐️ # 題目敘述 Given the head of a linked list, we repeatedly delete consecutive sequences of nodes that sum to 0 until there are no such sequences. After doing so, return the head of the final linked list. You may return any such answer. (Note that in the examples below, all sequences are...
2k 2 分鐘

⭐️⭐️⭐️ # 題目敘述 You are given two strings order and s . All the characters of order are unique and were sorted in some custom order previously. Permute the characters of s so that they match the order that order was sorted. More specifically, if a character x occurs before a character y in order ,...
856 1 分鐘

⭐️ # 題目敘述 Given two integer arrays nums1 and nums2 , return an array of their intersection. Each element in the result must be unique and you may return the result in any order. # Example 1 Input: nums1 = [1,2,2,1], nums2 = [2,2] Output: [2] # Example 2 Input: nums1 = [4,9,5], nums2 =...
889 1 分鐘

⭐️ # 題目敘述 Given two integer arrays nums1 and nums2 , sorted in non-decreasing order, return the minimum integer common to both arrays. If there is no common integer amongst nums1 and nums2 , return -1 . Note that an integer is said to be common to nums1 and nums2 if both arrays have at least one...
4.3k 4 分鐘

ChienI Kao 筆記網站 JHTNT 筆記網站 # What is Makefile? 在開始介紹 Makefile 語法前,我們先來了解一下到底什麼是 Make,而 Makefile 又是什麼? make 是一個指令,它會讀取 makefile 檔案中的內容,自動化編譯軟體。 makefile 是一個檔案,它描述了軟體的編譯規則。 簡單來說,make 和 makefile 的關係就像是廚師和食譜: make 是廚師,負責按照食譜(makefile)烹飪(編譯)軟體。 makefile...