Skip to content

Commit 38b9513

Browse files
committed
.
1 parent 99b79b4 commit 38b9513

11 files changed

+22
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
dijkstra (bfs). O(nm*min(k,n+m)), because we can wlog assume k<=n+m.
22

3-
remark. this is a special case (unweighted, planar) of the bicriteria s,t-path problem.
3+
remark. this is a special case (unweighted, planar) of the bicriteria s,t-path problem. Maybe we can prove some lower bound?
44

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
compute the level of each node. O(n).
2+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
O(n) or O(h).
2+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
kmp, find all occurrences of word. O(n).
2+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
O(n).
2+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
linked list. O(1) per operation.
2+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
LIS. O(n log n).
2+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
O(n).
2+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
hashing. O(n).
2+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
We can easily compute the concatenation of 2^i...2^{i+1}-1 using math formula. O(log^2 n). (the bottleneck is computing (2^i-1)^{-1} mod P)
2+
3+
https://stackoverflow.com/questions/64450456/concatenation-of-binary-representation-of-first-n-positive-integers-in-ologn-t
4+

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Problem ID marked with leading ~ indicates there's good evidences that the algor
4444
~898 Bitwise ORs of Subarrays
4545
1057 Campus Bikes
4646
~1074 Number of Submatrices That Sum to Target
47-
1293 Shortest Path in a Grid with Obstacles Elimination
47+
~1293 Shortest Path in a Grid with Obstacles Elimination
4848
1316 Distinct Echo Substrings
4949
~1334 Find the City With the Smallest Number of Neighbors at a Threshold Distance
5050
~1335 Minimum Difficulty of a Job Schedule

0 commit comments

Comments
 (0)