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

刷题打卡 -pxu

🔗
 楼主| pxu 2018-5-21 15:23:14 | 只看该作者
全局:
139. Word Break. Used recursion and memorization to handle it
回复

使用道具 举报

🔗
 楼主| pxu 2018-5-22 00:51:55 | 只看该作者
全局:
# Add Two Numbers forgot to add the carry need to add () around the conditional operator ?:
回复

使用道具 举报

🔗
 楼主| pxu 2018-5-22 00:52:45 | 只看该作者
全局:
# Add Two Numbers
forgot to add the carry
need to add () around the conditional operator ?:
回复

使用道具 举报

🔗
 楼主| pxu 2018-5-22 01:13:50 | 只看该作者
全局:
#160. Intersection of Two Linked Lists
forgot to move the point when calculate the list len
forgot to handle the edge case
回复

使用道具 举报

🔗
 楼主| pxu 2018-5-22 02:14:43 | 只看该作者
全局:
# Merge k Sorted Lists
for using priorityQueue:
  forgot the check the null node
for Divide and conquer using two way merge:
code could more precise. using while(right >0)
回复

使用道具 举报

🔗
 楼主| pxu 2018-5-22 04:18:55 | 只看该作者
全局:
#101. Symmetric Tree
used recursion or iteration with two queues
回复

使用道具 举报

🔗
 楼主| pxu 2018-5-22 05:13:03 | 只看该作者
全局:
#129. Sum Root to Leaf Numbers
check root by left and right node, check null of them
if(root.left == null && root.right == null){  
回复

使用道具 举报

🔗
 楼主| pxu 2018-5-22 06:45:53 | 只看该作者
全局:
#653. Two Sum IV - Input is a BST. lots of mistakes!
forgot to check k==root.val case
forgot to check (curr.val != k - curr.val)
forgot to check missing return statement
forgot to check root has no leafs case
回复

使用道具 举报

🔗
 楼主| pxu 2018-5-22 07:17:29 | 只看该作者
全局:
#572. Subtree of Another Tree
added wrong nodes into the queue, should be n1, n2 instead of curr q1.add(curr.left);
using recursion seems easier
回复

使用道具 举报

🔗
 楼主| pxu 2018-5-22 07:51:37 | 只看该作者
全局:
#102. Binary Tree Level Order Traversal
if (levelCount == 0) should be check after if(levelCount> 0) check, instead of if/else case
回复

使用道具 举报

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

本版积分规则

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