Skip to content

Commit 4f1879c

Browse files
committed
add time and space complexity
1 parent 4ae8b55 commit 4f1879c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Linked List/linked_list_delete_node.go

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ package main
88
Approach:
99
1. We can move the data from the next node into the current node
1010
2. Delete the next node.
11+
Time Complexity: O(1). Space Complexity: O(1).
1112
*/
1213
func deleteNode(node *ListNode) {
1314
temp = node.next

0 commit comments

Comments
 (0)