@@ -69,7 +69,7 @@ private static int[] MoveZeros(IReadOnlyList<int> arrayOfNumbers)
6969 private static int [ ] GetProductofArrayExceptSelf ( IReadOnlyList < int > inputArray )
7070 {
7171 if ( inputArray == null || inputArray . Count == 0 )
72- throw new ArgumentNullException ( "inputArray needs to have elements" ) ;
72+ throw new ArgumentNullException ( nameof ( inputArray ) , "inputArray needs to have elements" ) ;
7373
7474 return inputArray
7575 . Select ( arrayElement => inputArray . Where ( element => element != arrayElement )
@@ -108,7 +108,7 @@ private static int[] GetMinimumSizeSubarraySum(IReadOnlyList<int> inputArray, in
108108 private static string [ ] GetSummaryRanges ( int [ ] inputArray )
109109 {
110110 if ( inputArray == null || inputArray . Length == 0 )
111- throw new ArgumentNullException ( "inputArray needs to have elements" ) ;
111+ throw new ArgumentNullException ( nameof ( inputArray ) , "inputArray needs to have elements" ) ;
112112
113113 var listOfAnswers = new List < string > ( ) ;
114114
@@ -148,7 +148,7 @@ private static string[] GetSummaryRanges(int[] inputArray)
148148 private static string [ ] GetMissingRanges ( int lower , int upper , IReadOnlyCollection < int > inputArray )
149149 {
150150 if ( inputArray == null || inputArray . Count == 0 )
151- throw new ArgumentNullException ( "InputArray needs to have elements" ) ;
151+ throw new ArgumentNullException ( nameof ( inputArray ) , "InputArray needs to have elements" ) ;
152152
153153 if ( lower > upper && lower >= 0 && upper >= 0 )
154154 throw new ArgumentException ( "Correct arguments" ) ;
@@ -290,13 +290,6 @@ public void MissingRanges_10()
290290 public void MergeIntervals_11 ( )
291291 {
292292 //given
293- var inputArray = new [ ]
294- {
295- new [ ] { 1 , 3 } ,
296- new [ ] { 2 , 6 } ,
297- new [ ] { 8 , 10 } ,
298- new [ ] { 15 , 18 }
299- } ;
300293 var expectedArray = new [ ]
301294 {
302295 new [ ] { 1 , 6 } ,
0 commit comments