Skip to content

Instantly share code, notes, and snippets.

View kninami's full-sized avatar

kyungsuk CHO kninami

View GitHub Profile
import java.util.*;
class Solution {
public int solution(int[] A) {
Map<Integer,Integer> matchMap = new HashMap<Integer,Integer>();
int unPaired = 0;
for(int i=0;i<A.length;i++){
int value = matchMap.get(A[i])==null?0:matchMap.get(A[i]);
import java.util.*;
import java.lang.*;
import java.util.Arrays;
class Solution {
public int solution(int N) {
int N3 = 1;
String bina = Integer.toBinaryString(N);
String pro[] = bina.split("0");
int[] score = new int[pro.length];
@kninami
kninami / binary-gap.java
Created October 20, 2016 04:35
Codility Solution-binary gap
import java.util.ArrayList;
class Solution{
public int solution(int N){
ArrayList<Integer> array = new ArrayList<Integer>();
int count = 0;
int max = 0;
boolean flag = false;