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

刷题记录帖

🔗
 楼主| Oceanid77 2019-10-28 11:45:04 | 只看该作者
全局:
378. Kth Smallest Element in a Sorted Matrix
practice tomorrow
441. Arranging Coins
done
287. Find the Duplicate Number
dont understand cycle detection
142. Linked List Cycle II
similiar
981. Time Based Key-Value Store
study tomorrow.
回复

使用道具 举报

🔗
 楼主| Oceanid77 2019-10-29 13:12:56 | 只看该作者
全局:
981. Time Based Key-Value Store
comparater
treemap

378. Kth Smallest Element in a Sorted Matrix
have bug why?

74. Search a 2D Matrix
practice tomorrow
240. Search a 2D Matrix II
kan budong
300. Longest Increasing Subsequence
392. Is Subsequence
why? I cannot get it?
528. Random Pick with Weight
study tmr

回复

使用道具 举报

🔗
 楼主| Oceanid77 2019-10-31 02:05:32 | 只看该作者
回复

使用道具 举报

🔗
 楼主| Oceanid77 2019-10-31 11:57:15 | 只看该作者
全局:
441. Arranging Coins
brute force: from idea to implementation?
what is the process?
think tmr

349. Intersection of Two Arrays
binary search: how?why?
Java.util.Arrays.binarySearch() Method


475. Heaters
idea: it is similiar to koko eat banana. the problem now is that how can i find a way to check weather a radius is applicable?
iterate through each house, find the nearest heater, check if distance of them are smaller than radius.
how to find the nearest heater?


367. Valid Perfect Square
那么我最先想出的方法是这样的,比如一个数字 49,我们先对其除以2,得到 24,发现 24 的平方大于 49,那么再对 24 除以2,得到 12,发现 12 的平方还是大于 49,再对 12 除以2,得到6,发现6的平方小于 49,于是遍历6到 12 中的所有数,看有没有平方等于 49 的,有就返回 true,没有就返回 false,

how to implement?

69. Sqrt(x)
回复

使用道具 举报

🔗
 楼主| Oceanid77 2019-10-31 13:07:41 | 只看该作者
全局:
303. Range Sum Query - Immutable
354. Russian Doll Envelopes
DP
611. Valid Triangle Number
回复

使用道具 举报

🔗
 楼主| Oceanid77 2019-11-1 12:50:49 | 只看该作者
全局:
475. Heaters
idea: it is similiar to koko eat banana. the problem now is that how can i find a way to check weather a radius is applicable?
iterate through each house, find the nearest heater, check if distance of them are smaller than radius.
how to find the nearest heater?


java.util.Arrays.binarySearch(Object[] a, Object key)

This method returns index of the search key, if it is contained in the array, else it returns (-(insertion point) - 1). The insertion point is the point at which the key would be inserted into the array: the index of the first element greater than the key, or a.length if all elements in the array are less than the specified key.

https://www.geeksforgeeks.org/treeset-in-java-with-examples/
practice tomorrow

410. Split Array Largest Sum 分割数组的最大值
how  to convert from idea to implementation
practice tmr
回复

使用道具 举报

🔗
 楼主| Oceanid77 2019-11-3 10:16:12 | 只看该作者
本楼:
全局:
周五休息
回复

使用道具 举报

🔗
 楼主| Oceanid77 2019-11-4 12:03:58 | 只看该作者
全局:
周六:
group study
410. Split Array Largest Sum
understand it and practice
1237. Find Positive Integer Solution for a Given Equation
binary search
for(int x=1; x<=1000; x++){
            int low=1, high =1000;
            while(low<=high){
                int mid = low+(high-low)/2;
                if(customfunction.f(x,mid)>z){
                     high = mid-1;
                }else if(customfunction.f(x, mid)<z){
                    low = mid+1;
                }else{
                    ans.add(Arrays.asList(x,mid));
                    break;
//be careful with this part. TLE
                }
            }
        }
Equals and hashcode I dont understand.
https://www.geeksforgeeks.org/equals-hashcode-methods-java/
https://zhuanlan.zhihu.com/p/30321358
回复

使用道具 举报

🔗
 楼主| Oceanid77 2019-11-4 13:19:45 | 只看该作者
全局:
36. Valid Sudoku
37. Sudoku Solver
773. Sliding Puzzle
BFS
227. Basic Calculator II yixilie
think about the process
回复

使用道具 举报

🔗
 楼主| Oceanid77 2019-11-5 15:09:17 | 只看该作者
回复

使用道具 举报

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

本版积分规则

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