LIKE CODING
Monday, April 26, 2021
Print All Topology Sort
›
Link 本体是二流就(alien dictionary)。很快秒了,但是追加是输出所有topological sort的组合。卡在这了, 我当时的思路是 DFS preprocessing 每一个字母可以 reach 的 set ,做 permutation , reachab...
Number of Ways Fully Traverse a Matrix
›
Link 4、一个4*5迷宫里,给定起点终点和障碍,有多少种方法能够从起点走到终点,并把所有的非障碍点都走过。最开始是四个方向,然后问如果八个方向怎么办 ,如果是国际象棋皇后怎么办 第四题给的数据规模很小,是不是就是dfs暴力就可以了? 嗨,楼主,最后一题有步数限制嘛?如果没...
Range product (Binary Index Tree)
›
arr = [1,2,3,4,5,6,7]. return the sub array product [i, j]. https://iq.opengenus.org/fenwick-tree-range-product/ 1 2 3 4 5 6 7 8 ...
Thursday, April 15, 2021
LeetCode [1448] Count Good Nodes in Binary Tree
›
1448. Count Good Nodes in Binary Tree Medium 661 32 Add to List Share Given a binary tree root , a node X in the tree is named good ...
Saturday, April 3, 2021
LeetCode [938] Range Sum of BST
›
938. Range Sum of BST Easy 2214 289 Add to List Share Given the root node of a binary search tree, return the sum of values of all no...
Friday, April 2, 2021
LeetCode [1570] Dot Product of Two Sparse Vectors
›
1570. Dot Product of Two Sparse Vectors Medium 235 38 Add to List Share Given two sparse vectors, compute their dot product. Implement c...
‹
›
Home
View web version