6 6 6 5 6 -6 6 5
De Camptown ladies sing this song,5 -4 5 -4
Doo-da, Doo-da6 6 6 5 6 -6 6 5
De Camptown racetrack’s two miles long-4 -4 5 -4 4
Oh, de doo-da day.[Refrain]
4 4 5 6 7
G’wine to run all night-6 -6 7 -6 6
G’wine to run all day6 6 6 5 6 6 6 -6 6 6
I bet my money on a bob-tailed nag-4 -4 -4 5 -4 -4 4
Somebody bet on the gray
- Draw in
nil — Blow
Respite from coding :)
Here’s the tabs. Added lyrics for you to “hear the notes” and “keep the rythme”.
7B 7D 7B 6B 7B 7D 7B 6B
Silent Night, Holy Night
9D 9D 8D 8B 8B 7B
All is calm, All is Bright
7D 7D 8B 8D 7D 7B 7D 7B 6B
Round yon virgin, mother and child
7D 7D 8B 8D 7D 7B 7D 7B 6B
Holy Infant, so tender and mild
9D 9D 10D 9D 8D 8B 9B
Sleep in heavenly peach, ooh
8B 7B 6B 7B 6D 5D 5B
Sleep, sleep in heaven, heavenly peace
B — Blow
D — Draw (Suck in air)
Happy playing, fellow Chromatic Harmonica pals!
This story is a result of spending two years of intensive coding of questions on Data Structures and Algorithm questions on platforms like Lintcode and Leetcodes. I had always publish on solutions to thorny questions that I encountered so as to alleviate the pain of the next learner.
I will take a different tack here and focused on the efficient Python techniques picked up. These are usually non-obvious tricks through much searching of techniques to be more efficient in writing less code and be more Pythonic. So credits go to the great wide web.
adjacencyList = [[1, 0, 0], [1…
> pyinstaller main.py
The above command is said to be enough for you to bundle your newly written python app to face the world. It’s too simplistic. To use pyinstaller, you need to tinker with it. My aim is to share 3 tips so that you don’t have to take hard knocks.
> pyinstaller --name Pomodoro main.py
Using the long option of name above, you can avoid having your distribution directory and executable name following the python script name. Your client/users of your app likely won’t understand why the executable is named “main”.
> pyinstaller --name Pomodoro --add-data "./tomato.png:." main.py
You are given two integer arrays nums1 and nums2 sorted in ascending order and an integer k. Define a pair (u,v) which consists of one element from the first array and one element from the second array.
Find the k pairs (u1,v1),(u2,v2) …(uk,vk) with the smallest sums.
Return results need to be orderly.
Given nums1 = [1,7,11], nums2 = [2,4,6], k = 3
The two arrays are monotonic increasing. So it stands to reason that the first elements in each of the arrays when summed, will give the pair with smallest sum. From the diagram below, the…
In the world of the moon, ordinary people will solve a problem. This problem is a string of English letters. Each time you can delete an English letter. Try to delete as few times as possible to make the various letters’ frequency appear differently. The number of deletion is the answer of the calculation that needs to be returned.
Quite intuitively, we should straight away think of histogram of the letters and their frequency. The question gave the example of the string “aaabbb”. Below diagram put them in histogram form. Immediately, we could understand that to ensure the two letters…
Lintcode 257 or Leetcode 1048
Given a list of words, each word consists of English lowercase letters.
Let’s say word1 is a predecessor of word2 if and only if we can add exactly one letter anywhere in word1 to make it equal to word2. For example, “abc” is a predecessor of “abac”.
A word chain is a sequence of words [word_1, word_2, …, word_k] with k >= 1, where word_1 is a predecessor of word_2, word_2 is a predecessor of word_3, and so on. …