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
public static class Solution { | |
public static void main(String[] args) { | |
int a = 6000, b = 7000; | |
// int a = 10, b = 20; | |
// int a = 8, b = 24; | |
int smallestPerfect = getSmallestPerfectSqrt(a, b); | |
System.out.println(stepsToSmallestSqrt(smallestPerfect)); | |
} |
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
public class Solution { | |
public static int smallestNumber(int num) { | |
int count = 0; | |
while (num > 0) { | |
num = num / 10; | |
count++; | |
} | |
return (int) Math.pow(10, count - 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
import com.fasterxml.jackson.core.JsonProcessingException; | |
import com.fasterxml.jackson.databind.DeserializationFeature; | |
import com.fasterxml.jackson.databind.JsonNode; | |
import com.fasterxml.jackson.databind.ObjectMapper; | |
import com.fasterxml.jackson.databind.PropertyNamingStrategy; | |
import org.jooq.*; | |
import org.jooq.impl.DSL; | |
import java.sql.SQLException; | |
import java.sql.SQLFeatureNotSupportedException; |
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 de.zalando.ale.serviceclient.outboundpath.domain; | |
import com.google.common.collect.ImmutableMap; | |
import de.zalando.ale.serviceclient.outboundpath.domain.chain.ChainPickListPaths; | |
import de.zalando.ale.serviceclient.outboundpath.domain.enumeration.ShipperType; | |
public class OutboundPathToShipperTypeMapper { | |
private static ImmutableMap<String, ShipperType> shipperTypeMap = null; |
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 hackerrank.pairs | |
/** | |
* Created by vparashar on 27/01/2017. | |
*/ | |
object PairWithDifference { | |
def main(args: Array[String]) { | |
val sc = new java.util.Scanner(System.in) | |
val n = sc.nextInt() |
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 hackerrank | |
/** | |
* Created by vparashar on 26/01/2017. | |
*/ | |
object Solution { | |
def main(args: Array[String]): Unit = { | |
val a = Seq(2, 4) | |
val b = Seq(16, 32, 96) | |
println(countBetween(a, b)) |