This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package interview; | |
| import java.util.Arrays; | |
| class MergeSortTest { | |
| public static void main(String[] args) { | |
| int[][] sourceData = { | |
| { }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package interview; | |
| public class MergeSort { | |
| public void sort(int[] data) { | |
| if (data == null || data.length <= 1) { | |
| return; | |
| } | |
| sort(data, 0, data.length - 1); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <project xmlns="http://maven.apache.org/POM/4.0.0" | |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
| <!--Replace ${groupId}, ${artifactId} and ${name} below with proper values--> | |
| <modelVersion>4.0.0</modelVersion> | |
| <groupId>${groupId}</groupId> | |
| <artifactId>${artifactId}</artifactId> | |
| <name>${name}</name> |