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.ArrayList; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.PriorityQueue; | |
/* | |
Fixed, clear solution which I have created after studying the problem that works in the expected time | |
on Leetcode and is easy to understand and remember | |
*/ | |
class Solution { |
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
package com.adobe.prep; | |
import java.time.LocalDateTime; | |
import java.time.format.DateTimeFormatter; | |
import java.util.*; | |
import java.util.stream.Collectors; | |
public class GetYourGuide { | |
public static void main(String[] args) { | |
String s = "photo.jpg, Warsaw, 2013-09-05 14:08:15\n" + |
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 did not work because of an issue which I couldn't investigate further with the loop: | |
for (int i = 'a'; i < 'z'; i++) { | |
TrieNode child = curr.node.children.get((char) (i)); | |
if (child != null) { | |
queue.offer(new Pair(curr, (char) (i), child)); | |
} | |
} | |
I changed this in Solution2 | |
*/ |
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
package week3.assignment; | |
import edu.princeton.cs.algs4.Queue; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.Iterator; | |
import java.util.NoSuchElementException; | |
import java.util.stream.Collectors; |
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
package com.projectcheckins | |
import com.projectcheckins.core.CheckinsRepository | |
import com.projectcheckins.core.UserCheckins | |
import io.micronaut.context.annotation.Replaces | |
import io.micronaut.context.annotation.Requires | |
import io.micronaut.core.annotation.NonNull | |
import io.micronaut.http.HttpRequest | |
import io.micronaut.http.HttpResponse | |
import io.micronaut.http.HttpStatus |
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 2017-2020 original authors | |
* | |
* 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 | |
* | |
* https://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
package con.worldpay.syscon; | |
import com.amazonaws.auth.AWSStaticCredentialsProvider; | |
import com.amazonaws.auth.BasicAWSCredentials; | |
import com.amazonaws.services.s3.AmazonS3; | |
import com.amazonaws.services.s3.AmazonS3ClientBuilder; | |
import com.amazonaws.services.s3.model.CannedAccessControlList; | |
import com.amazonaws.services.s3.model.InitiateMultipartUploadRequest; | |
import com.amazonaws.services.s3.model.ObjectMetadata; | |
import com.amazonaws.services.s3.model.PutObjectRequest; |
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
// My solution (it passes 7 tests out of 10) | |
import java.util.*; | |
class Program { | |
// This is an input class. Do not edit. | |
static class BinaryTree { | |
public int value; | |
public BinaryTree left = null; | |
public BinaryTree right = null; |
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 React, {useState} from 'react'; | |
import {GoogleAPI, GoogleApiWrapper, Map, Marker} from 'google-maps-react' | |
import {render} from "react-dom"; | |
interface MapContainerProps { | |
google: GoogleAPI; | |
} | |
type MarkerEntry = { key: string, title: string, name: string, position: { lat: number, lng: number } }; | |
const markers: MarkerEntry[] = [ |
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
Mono<GeocodingResponseDto> personalAddressGeo = bundle.getGeocodingClient().getGeocoding(URLEncoder.encode(requestDTO.getPersonalAddress().getFirstLine(), StandardCharsets.UTF_8.toString()), apiKey); | |
Mono<GeocodingResponseDto> companyAddressGeo = bundle.getGeocodingClient().getGeocoding(URLEncoder.encode(requestDTO.getCompanyAddress().getFirstLine(), StandardCharsets.UTF_8.toString()), apiKey); | |
return personalAddressGeo | |
.subscribeOn(Schedulers.immediate()) | |
.flatMap(this::handleNotFound) | |
.doOnNext(x -> { | |
requestDTO.getPersonalAddress().setLat(x.getLocation().getLat()); | |
requestDTO.getPersonalAddress().setLon(x.getLocation().getLon()); | |
}) |
NewerOlder