Tic Tac Toe

摘要: ProblemN*N matrix is given with input red or black.You can move horizontally, vertically or diagonally. If 3 consecutive samecolor found, that color w... 阅读全文
posted @ 2014-11-21 05:47 SuperBo 阅读(258) 评论(0) 推荐(0) 编辑

Valid Password

摘要: ProblemIn 1-9 keypad one key is not working. If someone enters a password then not working key will not be entered. You have given expected password a... 阅读全文
posted @ 2014-11-21 05:41 SuperBo 阅读(646) 评论(0) 推荐(0) 编辑

Well-ordered String

摘要: ProblemYou know a password is well-ordered string. Well-ordered string means that the order of the characters is in an alphabetical increasing order. ... 阅读全文
posted @ 2014-11-21 05:28 SuperBo 阅读(633) 评论(0) 推荐(0) 编辑

Telephone Number

摘要: ProblemPrint all valid phone numbers of length n subject to following constraints:If a number contains a 4, it should start with 4No two consecutive d... 阅读全文
posted @ 2014-11-21 04:54 SuperBo 阅读(290) 评论(0) 推荐(0) 编辑

Cipe Coding Summary Part2

摘要: 25.Matrix PositionGiven an NxN matrix with unique integers :Find and print positions of all numbers such that it is the biggest in its row and also th... 阅读全文
posted @ 2014-11-19 05:40 SuperBo 阅读(575) 评论(0) 推荐(0) 编辑

Cipe Coding Summary Part1

摘要: 1. Colorful Number:A numbercan be broken into different sub-sequence parts. Suppose a number 3245 can bebroken into parts like 3 2 4 5 32 24 45 324 24... 阅读全文
posted @ 2014-11-17 08:36 SuperBo 阅读(661) 评论(0) 推荐(0) 编辑

Java tricks & knowledge Summary

摘要: 1. Get number of digits in an intvar length = (int)Math.Floor(Math.Log10(n) + 1);2. Keyword SuperUse super to refer superclass method if the method ha... 阅读全文
posted @ 2014-11-16 11:33 SuperBo 阅读(168) 评论(0) 推荐(0) 编辑

Epic OA Day2 2014/11/7

摘要: 1. Count and SayThe count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ...1is read off as"one 1"or11.11i... 阅读全文
posted @ 2014-11-08 01:31 SuperBo 阅读(258) 评论(0) 推荐(0) 编辑

LeetCode day15 2014/11/3

摘要: 42. Add Two NumbersLinkList 必看题!dummyHead43. Add Binarycarry = a.charAt(p1) - '0';res = String.valueOf(carry%2) + res;44. Merge K Sorted Lists跳过45. Ro... 阅读全文
posted @ 2014-11-04 11:33 SuperBo 阅读(97) 评论(0) 推荐(0) 编辑

LeetCode day14 2014/11/2

摘要: 36. Set Matrix ZerosConstant space solutionuse first row and first col as flag space which save the zeros row & col info. Store the first row & col o... 阅读全文
posted @ 2014-11-03 10:09 SuperBo 阅读(81) 评论(0) 推荐(0) 编辑