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

刷题打卡 -pxu

🔗
 楼主| pxu 2018-5-12 12:38:17 | 只看该作者
全局:
15. 3Sum . seems no question is easy question. tricky, sort and handle duplication.
回复

使用道具 举报

🔗
 楼主| pxu 2018-5-12 12:41:33 | 只看该作者
全局:
such a long day and feel really tired. will prepare the system design interview after show. good night to myself.
回复

使用道具 举报

🔗
 楼主| pxu 2018-5-12 22:27:11 | 只看该作者
全局:
Just noticed that I got huge points from the owner of this websites! Great thanks and what a nic day!
回复

使用道具 举报

🔗
 楼主| pxu 2018-5-12 23:33:46 | 只看该作者
全局:
completed 138. Copy List with Random Pointer. Easy but still didn't AC. forgot to assign curr = curr.next and hit the time limits. Sigh.
回复

使用道具 举报

🔗
 楼主| pxu 2018-5-13 00:41:49 | 只看该作者
全局:
49. Group Anagrams. i got java.lang.UnsupportedOperationException at java.util.AbstractList.add(AbstractList.java:105) when wrote codes like map.put(sorted, Arrays.asList(str)) as the arrays.asList return fixed size arraylist which will fail if new item added. changed to new ArrayList<String>(Arrays.asList(str)) and AC.
回复

使用道具 举报

🔗
 楼主| pxu 2018-5-13 01:10:31 | 只看该作者
全局:
notice that for below codes,         
for(Map.Entry<String, List<String>> entry: map.entrySet()){
            res.add(entry.getValue());
        }
it could be replaced as:        
        res.addAll(map.values());
回复

使用道具 举报

🔗
 楼主| pxu 2018-5-13 05:28:03 | 只看该作者
全局:
346. Moving Average from Data Stream - seems to be an easier question but I forgot to push data into the queue :(
回复

使用道具 举报

🔗
 楼主| pxu 2018-5-13 06:58:55 | 只看该作者
全局:
362. Design Hit Counter . The tricky is using queue.size() and make sure to remove the outdated timestamnp. When doing the while check, make sure check queue is not empty before doing peek(). Cheers!
回复

使用道具 举报

🔗
 楼主| pxu 2018-5-13 12:36:47 | 只看该作者
全局:
Spent hours on the word break question. It’s easy to understand using dis with memorization. When it comes to dynamic programming, feel touch to understand it. Hopefully, could figure out later today
回复

使用道具 举报

🔗
 楼主| pxu 2018-5-13 15:31:32 | 只看该作者
全局:
Just figure out the dp part of 139. Word Break. what a long day!
回复

使用道具 举报

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

本版积分规则

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