摘要:
A number is called 'desirable' if all thedigits are strictly ascending eg: 159 as 1<5<9. You know that your rivalhas a strictly numeric password that ... 阅读全文
摘要:
You are given a grid of numbers. A snakes equence is made up of adjacent numbers such that for each number, the number on the right or the number belo... 阅读全文
摘要:
N*N matrix is given with input red or black.You can move horizontally, vertically or diagonally. If 3 consecutive samecolor found, that color will get... 阅读全文
摘要:
Let the user enter a decimal number. Therange allowed is 0.0001 to 0.9999. Only four decimal places are allowed. Theoutput should be an irreducible fr... 阅读全文
摘要:
Given aNXN matrix, starting from the upper right corner of the matrix start printingvalues in a counter-clockwise fashion.E.g.: Consider N = 4Matrix= ... 阅读全文
摘要:
Invert a binary tree. 4 / \ 2 7 / \ / \1 3 6 9to 4 / \ 7 2 / \ / \9 6 3 1递归实现def invert_tree(root) root.right... 阅读全文
摘要:
Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words. For 阅读全文
摘要:
Find the total area covered by tworectilinearrectangles in a2Dplane.Each rectangle is defined by its bottom left corner and top right corner as shown ... 阅读全文
摘要:
Implement the following operations of a stack using queues.push(x) -- Push element x onto stack.pop() -- Removes the element on top of the stack.top()... 阅读全文
摘要:
here are a total ofncourses you have to take, labeled from0ton - 1.Some courses may have prerequisites, for example to take course 0 you have to first... 阅读全文