661 image smoother
平均它及其周围的8个数,懂了
832
Flipping an image
1.一半的iterate
2.y=1^x
867
transpose matrix
如何新建一个new_map
new_map = [[0]*len(matrix) for i in range(len(matrix[0]))]
883
想清楚logic,用几个例子来搞搞
892
我恨!
what?
dft有逻辑漏洞
why?
(i,j)不是边界,是个元素,会被反复访问,而我们无法控制!
so…..还是iterate最方便!!
1030
How to sort?
Merge sort—>YouTube!
只要有python的sorted,人就是自由的
别想破脑袋自己写sort算法了~~
sorted((i,j) , key=dis)
999
记住每一步的顺序很重要哇~~
iteration
1260
Shift grid,
先将它转换为vector,
再将k%(len(vector)
再shift vector
再放回grid
——————
普通话纠正:
膝盖xi
----------
10道做完后,去跑了步,买了寿司外卖,放弃了奶茶(如果进了2面,就买奶茶)
----------
实在是对反复review过的烂透的知识点没有review欲望,音乐救不了我,玩了一小时的游戏
----------
决定对知识点快速扫过名词,重点突破薄弱点,'写一个constraint'
---------
1.what is constraint random verif?
1.1:versus direct test
1.2:constraint -> random data -> coverage
2.function vs code coverage?
3.sv Oop?
4.race condition?
5.assertion? Immediate/ concurrent assertion
6.cast
7.第6章hw1
class exercise1;
rand bit [7:0] data;
rand bit[3:0] address;
constraint solu1{
((address==3)||(address==4));
}
endclass
initial begin
exercise1 ex;
ex=new;
assert(ex.randomize() else $fatal("failed"));
end
8.hw2
constraint data_c{data==5;}
Constraint addr_dist{
address dist{0:=1, [1:14]:/8, 15:=1};
}
9.hw3
initial begin
exercise1 ex;
repeat(20)begin
ex=new;
assert(ex.randomize() )
else $fatal("failed");
ex.print_all();
end
end
10.hw6(calculate the probability)
Y inside[x:3];
solve x before y;
probability for x==0, y inside[0:3] ==1/8
probability for x==1, y inside[1:3]==1/6
====
tommorow todo
1.5道leetcode
2.5道sv 写constraint
3.10点之前review 墙
=================review pool======
chapter 6
7-11做课后练习