渾沌沌

@chaosxlive

Joined on Nov 5, 2019

  • Ch.1 背景與議題 Background and Issues Investment: ~ Commitment of current resources in the expectation of deriving greater resources in the future. 現在付出成本,期待未來能因此受益。 Nature of Investment: ~ Reduce current consumption for greater future consumption. 減少目前的消費量,換取未來更大的消費量。
     Like  Bookmark
  • 原題連結: https://leetcode.com/problems/max-points-on-a-line/ Difficulty: Hard 題目說明 原文 Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. 翻譯 給定n個2D平面上的點,找出所有可能的共線中,含有點最多的點個數。
     Like  Bookmark
  • 原題連結: https://leetcode.com/problems/perfect-number/ Difficulty: Easy 題目說明 We define the Perfect Number is a positive integer that is equal to the sum of all its positive divisors except itself. Now, given an integer n, write a function that returns true when it is a perfect number and false when it is not. 範例測資
     Like  Bookmark
  • # LeetCode - 1. Two Sum ###### tags: `LeetCode` `Guide` `C++` `Easy` > 原題連結: https://leetcode.com/problems/two-sum/ > Difficulty: <span style="color: green;">Easy</span> ## 題目說明 Given an array of integers, return **indices** of the two numbers such that they add up to a specific target. You may assume that each input would have **exactly** one solution, and you may not use the same element twice. ## 範例測資 ### Example 1. #### Input: > Given nums = [2, 7, 11, 15], target = 9, #### Output: > [
     Like  Bookmark
  • # LeetCode - 895. Maximum Frequency Stack ###### tags: `LeetCode` `Guide` `C++` `Hard` > 原題連結: https://leetcode.com/problems/maximum-frequency-stack/ > Difficulty: <span style="color: red;">Hard</span> ## 題目說明 Implement **FreqStack**, a class which simulates the operation of a stack-like data structure. **FreqStack** has two functions: * **push(int x)**, which pushes an integer x onto the stack. * **pop()**, which **removes** and returns the most frequent element in the stack. If there is a
     Like  Bookmark