- [Data Structures] (https://gist.github.com/lawloretienne/6f7d7d92f72986f5ebd60f226d9044ee#data-structures)
- [Linked Lists] (https://gist.github.com/lawloretienne/6f7d7d92f72986f5ebd60f226d9044ee#linked-lists)
- [Trees] (https://gist.github.com/lawloretienne/6f7d7d92f72986f5ebd60f226d9044ee#trees)
- [Binary Trees] (https://gist.github.com/lawloretienne/6f7d7d92f72986f5ebd60f226d9044ee#binary-trees)
- [Binary Search Tree] (https://gist.github.com/lawloretienne/6f7d7d92f72986f5ebd60f226d9044ee#binary-search-tree)
- [Red-Black Tree] (https://gist.github.com/lawloretienne/6f7d7d92f72986f5ebd60f226d9044ee#red-black-tree)
- [AVL Tree] (https://gist.github.com/lawloretienne/6f7d7d92f72986f5ebd60f226d9044ee#avl-tree)
- [Tries] (https://gist.github.com/lawloretienne/6f7d7d92f72986f5ebd60f226d9044ee#tries)
This file contains 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
Application | |
I applied through an employee referral. The process took 3 weeks. I interviewed at Booking.com (Amsterdam (Netherlands)) in November 2016. | |
Interview | |
The process was quick. | |
Everyone is so friendly and it seems to be a really nice company to work on. | |
Also, booking.com office is a really nice place... | |
Unfortunately, I did not went so well in data structures and algorithms. | |
- HR phone interview |
This file contains 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 java.util.Arrays; | |
import java.util.Collection; | |
import java.util.List; | |
import java.util.stream.Collectors; | |
public class Main { | |
public static class Thingy { | |
private DifferentThingy nestedThingy; |
This file contains 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 void main(String[] args) { | |
System.out.println(String.format("10 is power of two = %s", isPowerOfTwo(10))); | |
System.out.println(String.format("8 is power of two = %s", isPowerOfTwo(8))); | |
System.out.println(String.format("-3 is power of two = %s", isPowerOfTwo(-3))); | |
System.out.println(String.format("3.14 is power of two = %s", isPowerOfTwo(3.14f))); | |
} | |
public static boolean isPowerOfTwo(float arg) { | |
if (Math.floor(arg) != arg) { | |
return false; |
This file contains 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
04-21 12:04:46.350 1203-1203/com.imaspanse.app D/PeopleNearbySubFragment﹕ bluetoothScanReceiver onReceive d = Device{address='72:65:45:58:46:DF', name='iPad', typeConnection=BLUETOOTH} | |
04-21 12:04:47.593 1203-1203/com.imaspanse.app D/PeopleNearbySubFragment﹕ bluetoothScanReceiver onReceive d = Device{address='10:1C:0C:60:F4:94', name='iPad', typeConnection=BLUETOOTH} |
This file contains 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 Observer loadObserver(String path, ISender server, int id) { | |
File file = new File(path); | |
try { | |
URL url = file.getParentFile().toURI().toURL(); | |
URL[] urls = new URL[]{url}; | |
// Create a new class loader with the directory | |
ClassLoader cl = new URLClassLoader(urls); |
This file contains 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
/* | |
* THIS CLASS IS PROVIDED TO THE PUBLIC DOMAIN FOR FREE WITHOUT ANY | |
* RESTRICTIONS OR ANY WARRANTY. | |
*/ | |
import android.content.SharedPreferences; | |
import android.content.SharedPreferences.Editor; | |
import android.text.Editable; | |
import android.text.Selection; | |
import android.text.TextUtils; |