This file contains 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
__author__ = "Paolo Maresca <plo.maresca@gmail.com" | |
DEBUG = True | |
def merge(sets): | |
""" | |
Merges together intersecting sets of numbers. The working assumption is: list of sets, and sets |
This file contains 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 it.pm.algorithms; | |
import it.pm.algorithms.impl.UnsortedLinkedList; | |
import java.util.Random; | |
import org.junit.After; | |
import org.junit.Assert; | |
import org.junit.Before; | |
import org.junit.Test; |
This file contains 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 it.pm.algorithms.impl; | |
import it.pm.algorithms.LinkedList; | |
/** | |
* Implementation of the {@link LinkedList} abstract class as unsorted list. | |
* | |
* @param <T> | |
* Type to use for Nodes' values |
This file contains 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 it.pm.algorithms; | |
/** | |
* Abstract class defining a linked list interface. | |
* | |
* @param <T> | |
* Type to use for Nodes' values | |
* | |
* @author Paolo Maresca <plo.maresca@gmail.com> |
This file contains 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
import java.io.BufferedReader; | |
import java.io.File; | |
import java.io.FileReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.net.URL; | |
import java.nio.charset.Charset; | |
import java.util.List; | |
import java.util.Objects; |
This file contains 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
import java.util.Arrays; | |
import java.util.List; | |
/** | |
* Nested Arrays Flattener runnable program. | |
* | |
* @author Paolo Maresca {@email plo.maresca@gmail.com } | |
*/ | |
public class NestedArraysFlattener |