scala-for-the-impatient-chapter-3-ex

ex 11234567891011121314/** * EX 1 : * Write a code snippet that sets a to an array of n random integers between 0 (inclusive) and n (exclusive). * * @param n * @return */priv...

Read More

scala-for-the-impatient-chapter-1-ex

ex 11234567891011/** * ex 1 : * The signum of a number is 1 if the number is positive, –1 if it is negative, and 0 if it is zero. Write a * function that computes this value. * * @...

Read More

elasticsearch-no-data-nodes-with-HTTP-enabled-available

problemwhen run spark job to write data to es cluster on aws, I got error like this: 12345678910111213141516171819/01/09 16:18:41 WARN TaskSetManager: Lost task 0.0 in stage 0.0 (T...

Read More

how to sync forked repo on github

after fork a project on github, you may also need to sync your repo with the original repo you forked from, how to do that? add upstream1git remote add upstream git@github.intuit....

Read More

elevator-design part 1

How to design an elevator systemthis is a famous interview questions. Design a elevator system would never be an easy task. How to ship people efficiently and quickly without over ...

Read More

manacher's algorithm

manacher’s algorithmwhat’s it?manacher’s algorithm is good at calculate palindrome string, the time-complexity can reach o(n). it would re-use the pattern to calcuate, so it is ver...

Read More

by-reference-or-by-value-java-vs-c++

Read More

what to think when you write binary search

Binary searchbinary search is prety tricky and have a lot hidden dents, here is my summary. Common problem given a non-descending array, find element with value m in the array. b...

Read More

My first post

hello, my test

Read More