Skip to content

Instantly share code, notes, and snippets.

View hakdogan's full-sized avatar
🎯
Focusing

Hüseyin Akdoğan hakdogan

🎯
Focusing
View GitHub Profile
@hakdogan
hakdogan / MissingPositive.java
Last active November 23, 2021 20:46
Solution of a coding interview problem. It finds the lowest positive integer that does not exist in the given integers array
package org.jugistanbul;
/**
* This problem was asked by Stripe.
*
* Given an array of integers, find the first missing positive integer in linear time and constant space.
* In other words, find the lowest positive integer that does not exist in the array.
* The array can contain duplicates and negative numbers as well.
*
* For example, the input [3, 4, -1, 1] should give 2. The input [1, 2, 0] should give 3.
@hakdogan
hakdogan / 6NisanCanlıYayınSoruları.md
Created March 18, 2020 11:55
6 Nisan 2020'de JUG İstanbul podcast kanalında cevaplanmak üzere sorularınızı paylaşabilirsiniz

Canlı yayında, Java ve yazılım dünyasına dair ele almamızı istediğiniz konu ve soruları buradan bizimle paylaşabilirsiniz.

@hakdogan
hakdogan / gist:87e1a8eb782a41458a29
Created April 7, 2015 13:51
Illustrates the use of Elasticsearch Snapshot and Restore module with Java API.
package com.kodcu.es.util;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.elasticsearch.action.admin.cluster.repositories.delete.DeleteRepositoryResponse;
import org.elasticsearch.action.admin.cluster.repositories.put.PutRepositoryResponse;
import org.elasticsearch.action.admin.cluster.snapshots.create.CreateSnapshotResponse;
import org.elasticsearch.action.admin.cluster.snapshots.delete.DeleteSnapshotResponse;
import org.elasticsearch.action.admin.cluster.snapshots.restore.RestoreSnapshotRequest;
import org.elasticsearch.action.admin.cluster.snapshots.restore.RestoreSnapshotResponse;