DSA 記錄坊
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Sharing URL Help
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee
  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # Leetcode solved ## check list - [Leetcode 能力 check!](https://hackmd.io/@DSArecorder/rJgrNjM9R) ## Algorithms - [分類題集](https://hackmd.io/@91UWhfTFSYS7v0K-bURk6A/SknFl2JoA) ## Problems - [21. Merge Two Sorted Lists](https://hackmd.io/@DSArecorder/SyQTX7pVJl) - [26. Remove Duplicates from Sorted Array](https://hackmd.io/@DSArecorder/rkzcgAgjn) - [27. Remove Element](https://hackmd.io/@DSArecorder/SJeSZ0gsh)* - [33. Search in Rotated Sorted Array](https://hackmd.io/@DSArecorder/SyXvxXgp6) - [34. Find First and Last Position of Element in Sorted Array](https://hackmd.io/@DSArecorder/r1lhZDepa) - [35. Search Insert Position](https://hackmd.io/@DSArecorder/SkmPmdInT) - [55. Jump Game](https://hackmd.io/@DSArecorder/S1AvkLHJ0) - [69. Sqrt(x)](https://hackmd.io/@DSArecorder/BkNGjtIna) - [70. Climbing Stairs](https://hackmd.io/@DSArecorder/HyQvNc9BA) - [74. Search a 2D Matrix](https://hackmd.io/@DSArecorder/H10zmO4oA) - [108. Convert Sorted Array to Binary Search Tree](https://hackmd.io/@DSArecorder/H1fIHVvmA) - [125. Valid Palindrome](https://hackmd.io/@DSArecorder/H16mL26Ap) - [141. Linked List Cycle](https://hackmd.io/@DSArecorder/Sk168nTAa) - [148. Sort List](https://hackmd.io/@DSArecorder/rkrmVNwQA) - [153. Find Minimum in Rotated Sorted Array](https://hackmd.io/@DSArecorder/ryZ3t4XRT) - [167. Two Sum II - Input Array Is Sorted](https://hackmd.io/@DSArecorder/BygrBhaRa) - [169. Majority Element](https://hackmd.io/@DSArecorder/ByzG7Y7qR) - [209. Minimum Size Subarray Sum](https://hackmd.io/@DSArecorder/BJASVwk41e) - [231. Power of Two](https://hackmd.io/@DSArecorder/BJcrEeQc0) - [240. Search a 2D Matrix II](https://hackmd.io/@DSArecorder/SksHKdVoA) - [268. Missing Number](https://hackmd.io/@DSArecorder/B1uNRgXq0) - [278. First Bad Version](https://hackmd.io/@DSArecorder/SknX4K8ha) - [367. Valid Perfect Square](https://hackmd.io/@DSArecorder/BJgJ6QXRT) - [374. Guess Number Higher or Lower](https://hackmd.io/@DSArecorder/HkZoGwg66) - [392. Is Subsequence](https://hackmd.io/@DSArecorder/H1gNY9Ackg) - [448. Find All Numbers Disappeared in an Array](https://hackmd.io/@DSArecorder/H1J1hxX50) - 476. Number Complement - [485. Max Consecutive Ones](https://hackmd.io/@DSArecorder/rJqhBeQ90) - [506. Relative Ranks](https://hackmd.io/@DSArecorder/r1We4h5Vyx) - [525. Contiguous Array](https://hackmd.io/@DSArecorder/HyO7I48vJe) - [704. Binary Search](https://hackmd.io/@DSArecorder/B1Imk8Lh6) - [704. Binary Search (元素重複)](https://hackmd.io/@DSArecorder/H1V_RDUn6) - [724. Find Pivot Index](https://hackmd.io/@DSArecorder/r1rPOXTwC) - [744. Find Smallest Letter Greater Than Target](https://hackmd.io/@DSArecorder/ryd_TmmRp) - [852. Peak Index in a Mountain Array](https://hackmd.io/@DSArecorder/ryZROV7CT) - [894. All Possible Full Binary Trees](https://hackmd.io/@DSArecorder/rkX0TY5HR) - [933. Number of Recent Calls](https://hackmd.io/@DSArecorder/rknm3TsEkl) - [965. Univalued Binary Tree](https://hackmd.io/@DSArecorder/S1v6mvnQkx) - [908. Smallest Range I](https://hackmd.io/@DSArecorder/ByvQk_PEJl) - [917. Reverse Only Letters](https://hackmd.io/@DSArecorder/B1gaHhNVyg) - [1046. Last Stone Weight](https://hackmd.io/@DSArecorder/BybBB29N1l) - [1190. Reverse Substrings Between Each Pair of Parentheses](https://hackmd.io/@DSArecorder/SJQC7G6w0) - [1252. Cells with Odd Values in a Matrix](https://hackmd.io/@DSArecorder/H1Nk1mlOlg) - [1337. The K Weakest Rows in a Matrix](https://hackmd.io/@DSArecorder/B1c7325V1l) - [1346. Check If N and Its Double Exist](https://hackmd.io/@DSArecorder/H1YqTC3QJx) - [1351. Count Negative Numbers in a Sorted Matrix](https://hackmd.io/@DSArecorder/BJvbDzqNge) - [1455. Check If a Word Occurs As a Prefix of Any Word in a Sentence](https://hackmd.io/@DSArecorder/rJ57F037Je) - [1475. Final Prices With a Special Discount in a Shop](https://hackmd.io/@DSArecorder/ByEfXWgr1l) - [1512. Number of Good Pairs](https://hackmd.io/@DSArecorder/B1VDkVCcC) - [1598. Crawler Log Folder](https://hackmd.io/@DSArecorder/HJfN5t7cA) - [1672. Richest Customer Wealth](https://hackmd.io/@DSArecorder/SkJ3RDvE1x) - [1726. Tuple with Same Product](https://hackmd.io/@DSArecorder/SyRLfCbKye) - [1760. Minimum Limit of Balls in a Bag](https://hackmd.io/@DSArecorder/HkoHlnNN1g) - [1784. Check if Binary String Has at Most One Segment of Ones](https://hackmd.io/@DSArecorder/Skmk5l7qA) - [1869. Longer Contiguous Segments of Ones than Zeros](https://hackmd.io/@DSArecorder/r1p0PemcR) - [1922. Count Good Numbers](https://hackmd.io/@DSArecorder/B1HtGh_0kl) - [1974. Minimum Time to Type Word Using Special Typewriter](https://hackmd.io/@DSArecorder/r1CTCrSkC) - [2099. Find Subsequence of Length K With the Largest Sum](https://hackmd.io/@DSArecorder/BkxpqT9VJx) - [2108. Find First Palindromic String in the Array](https://hackmd.io/@DSArecorder/BJOZMe790) - [2109. Adding Spaces to a String](https://hackmd.io/@DSArecorder/SyjwdO2Qyx) - [2181. Merge Nodes in Between Zeros](https://hackmd.io/@DSArecorder/Hy3Tm8ZKC) - [2248. Intersection of Multiple Arrays](https://hackmd.io/@DSArecorder/ryJ9uoMFR) - [2337. Move Pieces to Obtain a String](https://hackmd.io/@DSArecorder/rkRk58yNyx) - [2379. Minimum Recolors to Get K Consecutive Black Blocks](https://hackmd.io/@DSArecorder/B11yunGcA) - [2381. Shifting Letters II](https://hackmd.io/@DSArecorder/Byj_FovIJl) - [2429. Minimize XOR](https://hackmd.io/@DSArecorder/H1BwN04wkl) - [2469. Convert the Temperature](https://hackmd.io/@DSArecorder/HksR9PwVyg) - [2476. Closest Nodes Queries in a Binary Search Tree](https://hackmd.io/@DSArecorder/Sk1IWTQhJe) - [2529. Maximum Count of Positive Integer and Negative Integer](https://hackmd.io/@DSArecorder/rkssBPxaT) - [2540. Minimum Common Value](https://hackmd.io/@DSArecorder/ryNHTyQqC) - [2558. Take Gifts From the Richest Pile](https://hackmd.io/@DSArecorder/S1LS9V_Nke) - [2894. Divisible and Non-divisible Sums Difference](https://hackmd.io/@DSArecorder/ry2epDPNye) - [2942. Find Words Containing Character](https://hackmd.io/@DSArecorder/SJBL6wPNke) - [3091. Apply Operations to Make Sum of Array Greater Than or Equal to k](https://hackmd.io/@DSArecorder/r11jrBmtA) - [3190. Find Minimum Operations to Make All Elements Divisible by Three](https://hackmd.io/@DSArecorder/B1ymhvvNyx) - [3532. Path Existence Queries in a Graph I](https://hackmd.io/@DSArecorder/SJO1skaeeg) ## Weekly Contest - [Weekly Contest 132](https://hackmd.io/@leetcode-discuss/Hy1pEdVu1g) - [Weekly Contest 336](https://hackmd.io/@leetcode-discuss/H11t6WiJh) - [Weekly Contest 337](https://hackmd.io/@leetcode-discuss/HJkG_Lwx2) - [Weekly Contest 338](https://hackmd.io/@leetcode-discuss/Sygtf96g3) - [Weekly Contest 339](https://hackmd.io/@leetcode-discuss/rJtAwpL-2) - [Weekly Contest 340](https://hackmd.io/@leetcode-discuss/rknP4Akf2) - [Weekly Contest 341](https://hackmd.io/@leetcode-discuss/HyAyyMtGh) - [Weekly Contest 342](https://hackmd.io/@leetcode-discuss/SJivFHG7n) - [Weekly Contest 343](https://hackmd.io/@leetcode-discuss/HypyEFiQ3) - [Weekly Contest 344](https://hackmd.io/@leetcode-discuss/rJTwRhNE3) - [Weekly Contest 345](https://hackmd.io/@leetcode-discuss/BJT1KgAN2) - [Weekly Contest 346](https://hackmd.io/@leetcode-discuss/BkTD7NvHh) - [Weekly Contest 347](https://hackmd.io/@leetcode-discuss/S1aJ0wlL3) - [Weekly Contest 348](https://hackmd.io/@leetcode-discuss/Bk1dOsKIh) - [Weekly Contest 349](https://hackmd.io/@leetcode-discuss/BJTJ7k7D2) - [Weekly Contest 350](https://hackmd.io/@leetcode-discuss/rkTPafhw2) - [Weekly Contest 351](https://hackmd.io/@leetcode-discuss/ryR1dLBO2) - [Weekly Contest 352](https://hackmd.io/@leetcode-discuss/H1TvG9Cuh) - [Weekly Contest 353](https://hackmd.io/@leetcode-discuss/Syp1a6Dt3) - [Weekly Contest 354](https://hackmd.io/@leetcode-discuss/By5FsoZch) - [Weekly Contest 355](https://hackmd.io/@leetcode-discuss/BkU-f42ch) - [Weekly Contest 356](https://hackmd.io/@leetcode-discuss/BJuRcdSsh) - [Weekly Contest 357](https://hackmd.io/@leetcode-discuss/rkYSUdy62) - [Weekly Contest 358](https://hackmd.io/@leetcode-discuss/H1iprO1a3) - [Weekly Contest 359](https://hackmd.io/@leetcode-discuss/B1RWmuJ63) - [Weekly Contest 360](https://hackmd.io/@leetcode-discuss/BJyYf_kT3) - [Weekly Contest 388](https://hackmd.io/@leetcode-discuss/BJsR-y7Rp) - [Weekly Contest 389](https://hackmd.io/@leetcode-discuss/SyotQwSJC) - [Weekly Contest 390](https://hackmd.io/@leetcode-discuss/rJTH1wTCa) - [Weekly Contest 391](https://hackmd.io/@leetcode-discuss/SJzBC37cA) - [Weekly Contest 406](https://hackmd.io/@leetcode-discuss/Bk2p4fyo0) - [Weekly Contest 411](https://hackmd.io/@leetcode-discuss/BkiJeA2sR) - [Weekly Contest 412](https://hackmd.io/@leetcode-discuss/HJ5DKT3o0) - [Weekly Contest 419](https://hackmd.io/@leetcode-discuss/HkEdQxPl1l) - [Weekly Contest 420](https://hackmd.io/@leetcode-discuss/rkpRGxvg1l) - [Weekly Contest 430](https://hackmd.io/@leetcode-discuss/ry1rzCCH1l) - [Weekly Contest 432](https://hackmd.io/@leetcode-discuss/B1PlRScvkx) ## Biweekly Contest - [Biweekly Contest 100](https://hackmd.io/@leetcode-discuss/HyemQcDPx2) - [Biweekly Contest 101](https://hackmd.io/@leetcode-discuss/BJbCvp8Wh) - [Biweekly Contest 102](https://hackmd.io/@leetcode-discuss/rklg1MKMn) - [Biweekly Contest 103](https://hackmd.io/@leetcode-discuss/HJxx4YjQ2) - [Biweekly Contest 104](https://hackmd.io/@leetcode-discuss/ryllYgCE3) - [Biweekly Contest 105](https://hackmd.io/@leetcode-discuss/BJJl0vxI2) - [Biweekly Contest 106](https://hackmd.io/@leetcode-discuss/Skkx7J7Dh) - [Biweekly Contest 107](https://hackmd.io/@leetcode-discuss/rJWgd8H_h) - [Biweekly Contest 108](https://hackmd.io/@leetcode-discuss/rkeeT6vFn) - [Biweekly Contest 109](https://hackmd.io/@leetcode-discuss/SJU2XNnc3) - [Biweekly Contest 110](https://hackmd.io/@leetcode-discuss/Sk4snsanh) - [Biweekly Contest 111](https://hackmd.io/@leetcode-discuss/HJUN-O163) - [Biweekly Contest 137](https://hackmd.io/@leetcode-discuss/rJ53WGkjC) - [Biweekly Contest 142](https://hackmd.io/@leetcode-discuss/B13ETiTZ1g) - [Biweekly Contest 143](https://hackmd.io/@leetcode-discuss/SyBWPj6-1g)

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully