greenend.org.uk/~sgtatham/algorithms/listsort.html
Merge sort linked listµÄÌص㣺²»ÐèÒª¶îÍâ¿Õ¼ä£¬Ê±¼ä¸´ÔÓ¶ÈO(NlogN),²¢ÇÒÊÇstableµÄ
117. example:
char *words[] = {¡°foo¡±, ¡°bar¡±, ¡°baz¡±, NULL};
setup(words);
1) First step:
isMember(¡°foo¡±) -> true
isMember(¡°garply¡±) -> false
2) Second step:
isMember(¡°f.o¡±) -> true
isMember(¡°..¡±) -> false
*/
1. ÓÃmap¼´¿É¡£¡£¡£
2. ÐèÒª¶ÔwordsÀïÃæµÄÿһ¸öelementsÒÀ´ÎÆ¥Å䡣ΪÁ˼ÓËÙ£¬¿ÉÒÔÔ¤ÏȶÔwords¹¹½¨Ò»¿Ã×ÖµäÊ÷¡£
118. Given an integer, print the next smallest and next largest number that has the same number of 1 bits in their binary representation.
xxx011100 -> xxx100011
CODEÂÔ
119. Ò»¸öÓÐn¸öÕûÊýÊýÁУ¬Èç¹ûÓзûºÏÏÂÃæÌõ¼þ£¬¾Í·µ»Ø1£¬Èç¹ûûÓзµ»Ø0.
ÒªÇó£ºa[i]+a[j]>a[k]; a[i]+a[k]>a[j]; a[j]+a[k]>a[i]
ÏÈÅÅÐò£¬ÔٱȽÏÏàÁÚµÄÈý¸öÊý¼´¿É
120 ºÜ³¤ºÜ³¤µÄstring/file, ÒªÎÒÕÒ³öÖмäÖظ´´ÎÊý×î¶àµÄcharacter, character set
¿ÉÄÜÊÇÈκÎchar set, unicode. (map reduce, multi-thread)
TO LEARN£¬ дһÏÂÓÃmap reduce Ôõô×ö