Muser

弱小和无知不是生存的障碍,傲慢才是


  • Home

  • About

  • Tags

  • Categories

  • Archives

  • Notes

  • Commonweal 404

LeetCode: Coin Change

Posted on 2017-02-05 | Last modified: 2017-10-20 | In LeetCode
Words count: 471
ProblemYou are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you need to make up that amount. If that amount of money cannot be made up by any combination of the coins, return -1. Example 1: 12coins = [1, 2, 5], amount = 11return 3 (11 = 5 + 5 + 1) Example 2: 12coins = [2], amount = 3return -1. Note: You may assume that you have an infinite number of each kind of coin. SolutionThis is a c ...
Read more »

Learning LaTeX

Posted on 2017-01-31 | Last modified: 2019-02-01 | In Learning
Words count: 636
Getting StartedLaTeX is a document preparation system for high-quality typesetting, which is often used for technical and scientific documents. Let’s take an example first. Imagine you’re a writer, you want to write a new article and you start typing words in computer. When you open Microsoft Word, you find that you have to decide the font type, font size, layout … What you’re doing is not writing, but designing, which is definitely beyond the work of a writer! Well, this is ...
Read more »

Upload image to a Node.JS server

Posted on 2017-01-16 | Last modified: 2019-02-01 | In Learning
Words count: 365
Recently, I came up with a problem that I need to upload images to a Node server and display the image instantly. I write this post to keep a record of what I have done. Generally, firstly I wrap the uploading image as a FormData. 123#'upload[]' is the name attr of #upload-input#append the selected file to formData objformData.append('upload[]', file, file.name); Then I use jquery .ajax() method to send POST request to the server. 12345678910111213#processData:false means t ...
Read more »

LeetCode: Convert a Number to Hexadecimal

Posted on 2017-01-13 | Last modified: 2017-10-20 | In LeetCode
Words count: 0
Read more »

LeetCode: Binary Watch

Posted on 2017-01-12 | Last modified: 2017-10-20 | In LeetCode
Words count: 864
ProblemA binary watch has 4 LEDs on the top which represent the hours (0-11), and the 6 LEDs on the bottom represent the minutes (0-59). Each LED represents a zero or one, with the least significant bit on the right. For example, the above binary watch reads “3:25”. Given a non-negative integer n which represents the number of LEDs that are currently on, return all possible times the watch could represent. Example: 12Input: n = 1Return: ["1:00", "2:00", & ...
Read more »
1…101112
Muser

Muser

Coding While Thinking

60 posts
6 categories
67 tags
RSS
Search
© 2020 Muser | Site words count: 55.0k
Powered by Hexo
|
Theme — NexT.Muse