Skip to content

Instantly share code, notes, and snippets.

View itugs's full-sized avatar

MinGyoo Jung itugs

  • Kakao
  • Seoul, Korea
View GitHub Profile
@itugs
itugs / Solution.java
Last active May 29, 2023 01:52
HackerCards for Leanne
public class Solution {
static int[] hackerCards(int[] collection, int d) {
List<Integer> result = new ArrayList<>();
int s, e;
for(int idx = 0; idx <= collection.length; idx++) {
if (idx == 0) s = 1; else s = collection[idx-1] + 1;
if (idx != collection.length) e = collection[idx]; else e = Integer.MAX_VALUE;
if (d < s) break;
for (int k = s; k < e; k++) {
if (k <= d) {
@itugs
itugs / SetFromListPerfTest.java
Last active August 29, 2015 14:20
SetFromListPerfTest
public class SetFromListPerfTest {
@Test
public void listToLinkedHashSetTest() throws Exception {
final List<byte[]> data = buildListData();
doTest(new Callback() {
@Override
public String name() {