Time O(n). Space O(1).
Category Archives: Uncategorized
Sqrt(x) II – Python 3 (Week 11 – 01)
Time O(logn). Space O(1).
String to Integer (atoi) – Python 3 (Week 10 – 19)
Sparse Matrix Multiplication – Python 3 (Week 10 – 18)
Time O(n^3). Space O(n^2)
Generate Array – Python 3
Generate Array: AB = [0] * m = [0 for i in range(m)] = [0, 0, 0] AB = [[0] * m] = [[0, 0, 0]] AB = [[0] for i in range(m)] = [[0], [0], [0]] AB = [[0] * m for i in range(n)] = [[0, 0, 0], [0, 0, 0]]
Find the Celebrity – Python 3 (Week 10 – 17)
Time O(n). Space O(n).
Pow(x, n) – Python 3 (Week 10 – 16)
Time O(logn). Space O(1).
Integer to Roman – Python 3 (Week 10 – 15)
Valid Number – Python 3 (Week 10 – 14)
Valid Number – Java
Time O(n). Space O(1).