Run Code
|
API
|
Code Wall
|
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
Binary Search Recursive
1.2 Basics: object orientation
C# enum flag comparison with bitwise operators
WithoutPortNo
Homework1
Пример применения необязательных аргументов
Merge Sort
Found many section of times intersect.
Raiz Cuadrada
单链表