摘要: Given a knight in a chessboard (a binary matrix with 0 as empty and 1 as barrier) with a source position, find the shortest path to a destination posi 阅读全文
posted @ 2020-03-20 11:56 xuan_abc 阅读(130) 评论(0) 推荐(0)
摘要: Given two nodes in a binary tree (with parent pointer available), find their lowest common ancestor. Assumptions There is parent pointer for the nodes 阅读全文
posted @ 2020-03-20 09:58 xuan_abc 阅读(105) 评论(0) 推荐(0)