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
/* File: Enemies.java | |
* Created: 7/24/2019 | |
* Author: Sabbir Manandhar | |
* | |
* Copyright (c) 2019 Hogwart Inc. | |
*/ | |
import java.util.*; | |
//======================================================================================= |
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
/** | |
* @author Sabbir Manandhar | |
* [email protected] | |
*/ | |
class MinimumRange { | |
public int[] smallestRange(List<List<Integer>> nums) { | |
// Min heap to store intermediate k elements | |
PriorityQueue<int[]> heap = new PriorityQueue<>(new Comparator<int[]>() { | |
public int compare(int[] a, int[] b) { | |
return a[0] - b[0]; |
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.io.*; | |
import java.util.Scanner; | |
class Solution { | |
public static void main (String[] args) { | |
Scanner sc = new Scanner(System.in); | |
long X = sc.nextLong(); | |
long S = sc.nextLong(); | |
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
/* File: MockStaticMethodTest.java | |
* Created: 5/17/2019 | |
* Author: Sabbir Manandhar | |
* | |
* Copyright (c) 2019 Hogwart Inc. | |
*/ | |
package com.hogwart; | |
import org.junit.Assert; |
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
/* File: ShortestPath294.java | |
* Created: 2019-05-08 | |
* Author: Sabbir Manandhar | |
* | |
* Copyright (c) 2019 Hogwart Inc. | |
*/ | |
import java.util.ArrayList; | |
import java.util.HashMap; | |
import java.util.HashSet; |
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
/* File: ShortestPath294.java | |
* Created: 2019-05-08 | |
* Author: Sabbir Manandhar | |
* | |
* Copyright (c) 2019 Hogwart Inc. | |
*/ | |
import java.util.ArrayList; | |
import java.util.HashMap; | |
import java.util.HashSet; |
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 main | |
import "fmt" | |
// TestShortestPath solves sample examples | |
func TestShortestPath() { | |
elevations := map[int]int{ | |
0: 5, | |
1: 25, | |
2: 15, |
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
/* File: GraphTraversals.java | |
* Created: 5/3/2019 | |
* Author: Sabbir Manandhar | |
* | |
* Copyright (c) 2019 Hogwart Inc. | |
*/ | |
//======================================================================================= | |
import java.util.ArrayList; |
NewerOlder