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 com.kpbochenek.weird | |
import akka.actor.{Actor, ActorSystem, Props} | |
import akka.pattern.ask | |
import akka.testkit.{ImplicitSender, TestKit} | |
import akka.util.Timeout | |
import org.specs2.concurrent.ExecutionEnv | |
import org.specs2.matcher.FutureMatchers | |
import org.specs2.mutable._ |
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
import java.util.Arrays; | |
public class NthSmallest { | |
public static void main(String [] args) { | |
System.out.println(NthSmallest(new int[]{6, 5, 4, 3, 2, 1}, 2)); | |
} | |
public static int NthSmallest(int[] arr, int m) { | |
int start = 0; | |
int end = arr.length - 2; |