![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
daily review
文章平均质量分 67
每天10题猛刷
求质量,不求数量,每天5题,dig deeper!
展开
-
7.13 review 7.12
【leetcode】167.Two Sum II - Input array is sorted方法一:hash1.将i写成index 或想成index,可以避免犯index的错2.index是数列的下标,从0开始起,return 要求从1开始方法二:2 pointer(因为是sorted)利用sorted的特性【uvm 网课】uvm_scoreboarduvm_in_order_comparator #(type T)uvm_algorithm_comparat..原创 2021-07-13 09:41:47 · 71 阅读 · 0 评论 -
7.12 review 7.11
【leetcode】448.Find All Numbers Disappeared in an Array1.sort,找缺的gap2.if not in xxx,append xxx172.Factorial Trailing Zeroes 1个5,1个0【uvm 网课】==1==build phase:实例化,配置的config 机制uvm_config_db #(T) :: set/get( uvm_compon...原创 2021-07-12 10:36:44 · 162 阅读 · 0 评论 -
sv review 专题
【sv 专题】1.class 和 module 的异同?1.1:sv的三大特性:inheritance/polymorphism/encapsulation1.2:dynamic 与 static1.3: 同定义 method 和 variable2.interface 和 virtual interface?2.1:virtual interface是指针,可以传到class里,省掉了initiate;2.2:interface连接class和module;3.cl原创 2021-07-09 14:20:47 · 93 阅读 · 0 评论 -
8.3 review
【leetcode】binary tree1.iteration2.recursive3.万事想想None实例1.Maximum Depth of Binary Tree要点:recursive2.Convert Sorted Array to Binary Search Tree要点:root.val=xxxxroot.left=TreeNode(0)root.right=TreeNode(0)这样return的root就会有...原创 2021-07-06 11:42:13 · 61 阅读 · 0 评论 -
7.9 review 7.7
【leetcode】linked lists1.linked list cycle2.Intersection of Two Linked Lists注意点:1.hash_map 法nodes_seen=set() ; ;nodes_seen=[]nodes_seen.add(head) ; ;nodes_seen.append(head)1.1.head 是ListNode也可以放在set()里1.2.set() 比list= [] 要快2.环监测算法slo..原创 2021-07-09 10:06:34 · 83 阅读 · 0 评论 -
7.7 review 7.6
【leetcode】566. reshape the matrixy%x 代表着对x求余y//x 代表着对x除,然后求整【uvm 网课】{factory 工厂机制}1.uvm_coreservice_t/uvm_factory 独立于uvm environment之外(这个class 的意义和应用?)2.后台利用工厂来进行创建create_component_by_name/type()create_object_by_type/name()create_compon原创 2021-07-07 10:21:27 · 72 阅读 · 0 评论 -
8.1 review 2
1.draw 一个5 stage in-order pipeline 的图,并讲清楚!原创 2021-07-04 09:57:18 · 62 阅读 · 0 评论 -
8.1 review
【leetcode 658】solution:binary search+sliding window注意点:1.数组边界,上下都不要超过e.g:arr[p], while p>=0 and p<=len(arr)-12.binary search2.1:迭代的div:div=len(arr)/2 -->div=div/22.2: div=max(div/2,1),div要保证下边界为13.return 的数组arr[pl:pr] 返回的是 [...原创 2021-07-04 09:54:38 · 55 阅读 · 0 评论