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
/* | |
* Copyright (C) 2014 skyfish.jy@gmail.com | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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 abstract class BaseEndpoint { | |
protected static final String BASE_URL = "https://api.instagram.com/v1/"; | |
protected static OkHttpClient httpClient = new OkHttpClient(); | |
protected static HttpLoggingInterceptor logging = new HttpLoggingInterceptor(); | |
protected static Retrofit.Builder builder = new Retrofit.Builder() | |
.baseUrl(BASE_URL) | |
.addConverterFactory(GsonConverterFactory.create()); | |
protected final String accessToken; | |
protected BaseEndpoint(final String accessToken) { |
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 class TrieLC { | |
public static void main(String[] args) { | |
Trie trie = new Trie(); | |
trie.addWord("apple"); | |
trie.addWord("apply"); | |
trie.addWord("application"); | |
System.out.println(trie.getWords("app")); | |
System.out.println(trie.search("application")); | |
} | |
} |
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
/** | |
* Build a flight schedule where we can identify a closest airport for a plane to land. | |
* A plane is in the air. The pilot uses this program to search for the closest airport in the area where it can land. The airport should * be able to accomodate the size of the plane. For example, if the plane size is 737, the airport must be a large one. | |
*/ | |
Class Airport { | |
double latitude; | |
double longitude; | |
boolean isAvailable; | |
//getters() | |
//setters() |
NewerOlder