07 2017 档案

摘要:Write a SQL query to rank scores. If there is a tie between two scores, both should have the same ranking. Note that after a tie, the next ranking num 阅读全文
posted @ 2017-07-11 12:48 六层楼 阅读(1412) 评论(0) 推荐(0) 编辑
摘要:Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation. Note: Example 1: Exa 阅读全文
posted @ 2017-07-04 17:02 六层楼 阅读(462) 评论(0) 推荐(0) 编辑
摘要:与树的前中后序遍历的DFS思想不同,层次遍历用到的是BFS思想。一般DFS用递归去实现(也可以用栈实现),BFS需要用队列去实现。 层次遍历的步骤是: 1.对于不为空的结点,先把该结点加入到队列中 2.从队中拿出结点,如果该结点的左右结点不为空,就分别把左右结点加入到队列中 3.重复以上操作直到队列 阅读全文
posted @ 2017-07-03 09:22 六层楼 阅读(15158) 评论(2) 推荐(0) 编辑

点击右上角即可分享
微信分享提示