Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcf85f99

Browse files
authored
Improved tasks 142, 148
1 parent851d43f commitcf85f99

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

‎src/main/cpp/g0101_0200/s0142_linked_list_cycle_ii/Solution.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22
// #Data_Structure_II_Day_10_Linked_List #Level_1_Day_4_Linked_List #Udemy_Linked_List
33
// #Big_O_Time_O(N)_Space_O(1) #2024_05_27_Time_9_ms_(47.48%)_Space_10.2_MB_(18.65%)
44

5+
/**
6+
* Definition for singly-linked list.
7+
* struct ListNode {
8+
* int val;
9+
* ListNode *next;
10+
* ListNode() : val(0), next(nullptr) {}
11+
* ListNode(int x) : val(x), next(nullptr) {}
12+
* ListNode(int x, ListNode *next) : val(x), next(next) {}
13+
* };
14+
*/
515
classSolution {
616
public:
717
ListNode*detectCycle(ListNode* head) {

‎src/main/cpp/g0101_0200/s0148_sort_list/Solution.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22
// #Divide_and_Conquer #Merge_Sort #Level_2_Day_4_Linked_List #Top_Interview_150_Divide_and_Conquer
33
// #Big_O_Time_O(log(N))_Space_O(log(N)) #2024_05_27_Time_130_ms_(50.49%)_Space_73.5_MB_(37.52%)
44

5+
/**
6+
* Definition for singly-linked list.
7+
* struct ListNode {
8+
* int val;
9+
* ListNode *next;
10+
* ListNode() : val(0), next(nullptr) {}
11+
* ListNode(int x) : val(x), next(nullptr) {}
12+
* ListNode(int x, ListNode *next) : val(x), next(next) {}
13+
* };
14+
*/
515
classSolution {
616
public:
717
ListNode*sortList(ListNode* head) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp