Skip to content

Instantly share code, notes, and snippets.

View kpbochenek's full-sized avatar

Krzysiek Bochenek kpbochenek

View GitHub Profile
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._
package com.kpbochenek
import scalaz.{@@, Tag}
object XX {
sealed trait CustomerId
sealed trait OrderId
sealed trait WorkerId
@kpbochenek
kpbochenek / NthSmallest.java
Created September 14, 2018 19:21
Java NthSmallest
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;