Skip to main content


Showing posts from December, 2013

GIT Knowledge

#1 Git author Unknown
Sets the name of the user for all git instances on the system
$ git config --global "Firstname Lastname"
$ git config --global ""
name = Bob Gilmore
email =
3.3  get remote server  branch info
3.4  switch to branch
#4  Git  fetch
-- cache the info entered
#6 Git check out
#7 Git pull
 you have to tell git where to pull from, in this case from the current directory/repository:
git pull . master  but when working locally, you usually just call merge (pull internally calls merge):
git merge master#8 git git-credentials
#9 git merge

Solution:  Or even better than running git config, you can edit your ~/.gitconfig file directly. Look and see if there's a section for [user] with the relevant information. For example, my ~/.gitconfig has this... (There's no space in front of the [user], and single tabs in front of the name and email labels) If it doesn't have those set properl…

Top 10 Algorithms for Coding Interview

The following are top 10 algorithms related concepts in coding interview. I will try to illustrate those concepts though some simple examples. As understanding those concepts requires much more effort, this list only serves as an introduction. They are viewed from a Java perspective and the following concepts will be covered: StringLinked ListTreeGraphSortingRecursion vs. IterationDynamic ProgrammingBit ManipulationProbabilityCombinations and PermutationsOther problems that need us to find patterns I will keep updating this list to add more classic problems and problems from Leetcode. 1. String Unlike in C++, a String is not a char array in Java. It is a class that contains a char array and other fields and methods. Without code auto-completion of any IDE, the following methods should be remembered. toCharArray()//get char array of a StringArrays.sort()//sort an arrayArrays.toString(char[] a)//convert to string c…