楼主: pxu
跳转到指定楼层
上一主题 下一主题
收起左侧

刷题打卡 -pxu

🔗
 楼主| pxu 2018-5-16 15:58:18 | 只看该作者
全局:
297. Serialize and Deserialize Binary Tree . I thought I've done this but leetcode told me that I didn't. weird though. This should use either preorder or postorder as the inorder seems can not make sure the treenode has the unique structures. for the null node, need to mark as something like '#' so that null could be handled during deseriazation. Good night.
回复

使用道具 举报

🔗
 楼主| pxu 2018-5-17 11:29:09 | 只看该作者
全局:
490. The Maze - make sure using visited][] and bound to the end
回复

使用道具 举报

🔗
 楼主| pxu 2018-5-18 00:54:47 | 只看该作者
全局:
505. The Maze II, I was using the bfs and it should not use visited[][] to track whether the point has being visisted before as it will have to get the shortest path
回复

使用道具 举报

🔗
 楼主| pxu 2018-5-18 03:26:42 | 只看该作者
全局:
42. Trapping Rain Water. Tried both two points and dp solutions and feels good.
回复

使用道具 举报

🔗
 楼主| pxu 2018-5-18 14:38:56 | 只看该作者
全局:
4. Median of Two Sorted Arrays  - implemented with binarysearch tree to reach time complexity to log(m+n)
回复

使用道具 举报

🔗
 楼主| pxu 2018-5-18 15:19:44 | 只看该作者
全局:
11. Container With Most Water - used two points and make sure compare with height[l] and height[r] , not l and r.
回复

使用道具 举报

🔗
 楼主| pxu 2018-5-18 16:00:50 | 只看该作者
全局:
reviewed union-find data structure and algorithm just now. feels good on it.
回复

使用道具 举报

🔗
 楼主| pxu 2018-5-19 01:48:12 | 只看该作者
全局:
684. Redundant Connection - resolved by using union find
回复

使用道具 举报

🔗
 楼主| pxu 2018-5-19 03:48:41 | 只看该作者
全局:
261. Graph Valid Tree - used union find to resolve it this time. make sure check edge length = n-1
回复

使用道具 举报

🔗
 楼主| pxu 2018-5-19 04:45:39 | 只看该作者
全局:

261. Graph Valid Tree -  re-implemented with both BFS and DFS. need to use status to check whether a node has been visited or not
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册账号
隐私提醒:
  • ☑ 禁止发布广告,拉群,贴个人联系方式:找人请去🔗同学同事飞友,拉群请去🔗拉群结伴,广告请去🔗跳蚤市场,和 🔗租房广告|找室友
  • ☑ 论坛内容在发帖 30 分钟内可以编辑,过后则不能删帖。为防止被骚扰甚至人肉,不要公开留微信等联系方式,如有需求请以论坛私信方式发送。
  • ☑ 干货版块可免费使用 🔗超级匿名:面经(美国面经、中国面经、数科面经、PM面经),抖包袱(美国、中国)和录取汇报、定位选校版
  • ☑ 查阅全站 🔗各种匿名方法

本版积分规则

>
快速回复 返回顶部 返回列表