Skip to content

Commit 9c38b83

Browse files
authored
Fixed Formatting 0004-median-of-two-sorted-arrays.dart
1 parent 0d8c75a commit 9c38b83

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed
Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
class Solution {
22
double findMedianSortedArrays(List<int> nums1, List<int> nums2) {
3-
List<int>list=nums1+nums2;
3+
List<int>list = nums1 + nums2;
44

55
list.sort();
6-
int index= list.length~/2;
7-
bool isodd=(list.length & 0x01) != 0;
8-
if(!isodd){
9-
return (list[index]+list[index-1])/2;
6+
int index = list.length ~/ 2;
7+
bool isodd = (list.length & 0x01) != 0;
8+
if (!isodd) {
9+
return (list[index] + list[index - 1]) / 2;
1010
}
11-
else
1211
return double.parse(list[index].toString());
13-
14-
1512
}
16-
}
13+
}

0 commit comments

Comments
 (0)