Skip to content

Commit 0e0a2bc

Browse files
committed
add time and space complexity
1 parent 8886e7d commit 0e0a2bc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Linked List/linked_list_pallindrome.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@
3636
* };
3737
*/
3838

39-
// TODO: Implement O(1) space
39+
// Time Complexity : O(n) Space Complexity: O(n)
40+
// TODO: Implement O(n) Time and O(1) space solution
4041
class Solution {
4142
public:
4243
bool isPalindrome(ListNode* head) {

0 commit comments

Comments
 (0)