Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
merging of sorted arrays
//Title of this code //Rextester.Program.Main is the entry point for your code. Don't change it. using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { Hashset<int> expected = new Hashset<int> {1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,4,4,4,4,4,5,5,5,5,5}; int[][] intput = new int[][] { new int[] {3,2,4,1,5}, new int[] {3,2,4,1,5}, new int[] {3,2,4,1,5}, new int[] {3,2,4,1,5}, new int[] {3,2,4,1,5}}; int[] actual = MergeSort.Merge(input); Assert(expected.SetEquals(actual), "merges 5 arrays of the same size"); } public static void Assert(bool result, string message) { Console.WriteLine("ASSERT: {0}: {1}", result ? "PASS": "FAIL", message); } public static class MergeSort() { public static int[] Merge(int[][] input) { } } } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
xml
Fibonacci Numbers
nums y lists
test
lab
changeMe
Project Euler Problem 10
Trials
tesyyyyy
Test02
Please log in to post a comment.