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

Commit a689d1f

Browse files
Fix analyze errors
1 parent 14beb62 commit a689d1f

File tree

4 files changed

+32
-38
lines changed

4 files changed

+32
-38
lines changed

‎lib/src/easy/21.merge_two_sorted_lists/main.dart‎

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,12 @@
77

88
import '../../structure/list_node.dart';
99

10-
/**
11-
* Definition for singly-linked list.
12-
* class ListNode {
13-
* int val;
14-
* ListNode? next;
15-
* ListNode([this.val = 0, this.next]);
16-
* }
17-
*/
10+
/// Definition for singly-linked list.
11+
/// class ListNode {
12+
/// int val;
13+
/// ListNode? next;
14+
/// ListNode([this.val = 0, this.next]);
15+
/// }
1816
class Solution {
1917
ListNode? mergeTwoLists(ListNode? list1, ListNode? list2) {
2018
ListNode dummy = ListNode(0);

‎lib/src/easy/83.remove_duplicates_from_sorted_list/main.dart‎

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,12 @@
99
1010
import 'package:leetcode/src/structure/list_node.dart';
1111

12-
/**
13-
* Definition for singly-linked list.
14-
* class ListNode {
15-
* int val;
16-
* ListNode? next;
17-
* ListNode([this.val = 0, this.next]);
18-
* }
19-
*/
12+
/// Definition for singly-linked list.
13+
/// class ListNode {
14+
/// int val;
15+
/// ListNode? next;
16+
/// ListNode([this.val = 0, this.next]);
17+
/// }
2018
class Solution {
2119
ListNode? deleteDuplicates(ListNode? head) {
2220
if (head == null) return null;

‎lib/src/easy/94.binary_tree_inorder_traversal/main.dart‎

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,13 @@
33
44
import 'package:leetcode/src/structure/tree_node.dart';
55

6-
/**
7-
* Definition for a binary tree node.
8-
* class TreeNode {
9-
* int val;
10-
* TreeNode? left;
11-
* TreeNode? right;
12-
* TreeNode([this.val = 0, this.left, this.right]);
13-
* }
14-
*/
6+
/// Definition for a binary tree node.
7+
/// class TreeNode {
8+
/// int val;
9+
/// TreeNode? left;
10+
/// TreeNode? right;
11+
/// TreeNode([this.val = 0, this.left, this.right]);
12+
/// }
1513
class Solution {
1614
List<int> inorderTraversal(TreeNode? root) {
1715
List<int> res = [];

‎lib/src/medium/49.group_anagrams/main.dart‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,19 @@ void main(List<String> args) {
3838
/// The time complexity of this variant is `O(n * k * log(k))`, where `n` is the length of
3939
/// the input list `strs` and `k` is the maximum length of a string in `strs`.
4040
41-
List<List<String>> _groupAnagrams(List<String> strs) {
42-
Map<String, List<String>> anagramGroups = {};
43-
44-
for (String str in strs) {
45-
String sortedStr = String.fromCharCodes(str.runes.toList()..sort());
46-
if (!anagramGroups.containsKey(sortedStr)) {
47-
anagramGroups[sortedStr] = [];
48-
}
49-
anagramGroups[sortedStr]?.add(str);
50-
}
51-
52-
return anagramGroups.values.toList();
53-
}
41+
// List<List<String>> _groupAnagrams(List<String> strs) {
42+
// Map<String, List<String>> anagramGroups = {};
43+
44+
// for (String str in strs) {
45+
// String sortedStr = String.fromCharCodes(str.runes.toList()..sort());
46+
// if (!anagramGroups.containsKey(sortedStr)) {
47+
// anagramGroups[sortedStr] = [];
48+
// }
49+
// anagramGroups[sortedStr]?.add(str);
50+
// }
51+
52+
// return anagramGroups.values.toList();
53+
// }
5454

5555
/// NB: The sorting variant is slower than counting the frequency of each character.
5656
/// However, the second algorithm may be faster than the first algorithm for inputs

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /