随笔分类 -  leetcode

leetcode
Word Frequency
摘要:Write a bash script to calculate the frequency of each word in a text filewords.txt.For simplicity sake, you may assume:words.txtcontains only lowerca... 阅读全文

posted @ 2015-05-08 08:50 chybot 阅读(262) 评论(0) 推荐(0)

Tenth Line
摘要:How would you print just the 10th line of a file?For example, assume thatfile.txthas the following content:Line 1Line 2Line 3Line 4Line 5Line 6Line 7L... 阅读全文

posted @ 2015-05-07 21:48 chybot 阅读(206) 评论(0) 推荐(0)

Valid Phone Numbers
摘要:Given a text filefile.txtthat contains list of phone numbers (one per line), write a one liner bash script to print all valid phone numbers.You may as... 阅读全文

posted @ 2015-05-07 21:42 chybot 阅读(335) 评论(0) 推荐(0)

Add Two Numbers
摘要:You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single ... 阅读全文

posted @ 2015-05-06 13:50 chybot 阅读(199) 评论(0) 推荐(0)