上一页 1 ··· 4 5 6 7 8 9 10 11 下一页
摘要: "Forever number" is a positive integer A with K digits, satisfying the following constrains: the sum of all the digits of A is m; the sum of all the d 阅读全文
posted @ 2021-02-20 21:21 coderJ_ONE 阅读(144) 评论(0) 推荐(0) 编辑
摘要: Dijkstra's algorithm is one of the very famous greedy algorithms. It is used for solving the single source shortest path problem which gives the short 阅读全文
posted @ 2021-02-19 23:24 coderJ_ONE 阅读(58) 评论(0) 推荐(0) 编辑
摘要: Given a syntax tree (binary), you are supposed to output the corresponding postfix expression, with parentheses reflecting the precedences of the oper 阅读全文
posted @ 2021-02-19 23:12 coderJ_ONE 阅读(47) 评论(0) 推荐(0) 编辑
摘要: Given two singly linked lists L​1​​=a​1​​→a​2​​→⋯→a​n−1​​→a​n​​ and L​2​​=b​1​​→b​2​​→⋯→b​m−1​​→b​m​​. If n≥2m, you are supposed to reverse and merge 阅读全文
posted @ 2021-02-19 22:56 coderJ_ONE 阅读(61) 评论(0) 推荐(0) 编辑
摘要: 给定一个n*m的二维整数数组,用来表示一个迷宫,数组中只包含0或1,其中0表示可以走的路,1表示不可通过的墙壁。 最初,有一个人位于左上角(1, 1)处,已知该人每次可以向上、下、左、右任意一个方向移动一个位置。 请问,该人从左上角移动至右下角(n, m)处,至少需要移动多少次。 数据保证(1, 1 阅读全文
posted @ 2021-02-18 22:21 coderJ_ONE 阅读(38) 评论(0) 推荐(0) 编辑
摘要: Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal sequences, a binary tree can be u 阅读全文
posted @ 2021-02-18 21:22 coderJ_ONE 阅读(35) 评论(0) 推荐(0) 编辑
摘要: Telefraud(电信诈骗) remains a common and persistent problem in our society. In some cases, unsuspecting victims lose their entire life savings. To stop th 阅读全文
posted @ 2021-02-18 21:14 coderJ_ONE 阅读(109) 评论(0) 推荐(0) 编辑
摘要: Zhejiang University is about to celebrate her 122th anniversary in 2019. To prepare for the celebration, the alumni association (校友会) has gathered the 阅读全文
posted @ 2021-02-18 21:05 coderJ_ONE 阅读(63) 评论(0) 推荐(0) 编辑
摘要: Sexy primes are pairs of primes of the form (p, p+6), so-named since "sex" is the Latin word for "six". (Quoted from http://mathworld.wolfram.com/Sexy 阅读全文
posted @ 2021-02-18 20:54 coderJ_ONE 阅读(126) 评论(0) 推荐(0) 编辑
摘要: The "eight queens puzzle" is the problem of placing eight chess queens on an 8×8 chessboard so that no two queens threaten each other. Thus, a solutio 阅读全文
posted @ 2021-02-17 21:55 coderJ_ONE 阅读(57) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 下一页