This file contains hidden or 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
#include <iostream> | |
#include <map> | |
using namespace std; | |
class Node { | |
public: | |
int key, value; | |
Node *prev, *next; | |
Node(int k, int v): key(k), value(v), prev(NULL), next(NULL) {} | |
}; |
This file contains hidden or 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.HashMap; | |
import java.util.Map; | |
public class LRUCache<T> { | |
private final int capacity; | |
private int size; | |
private final Map<String, Node> hashmap; | |
private final DoublyLinkedList internalQueue; |
This file contains hidden or 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
#include <iostream> | |
#include <string> | |
#include <map> | |
using namespace std; | |
void makeMapping(map<int, string>& mapping) { | |
mapping[0] = ""; | |
mapping[1] = "One"; | |
mapping[2] = "Two"; | |
mapping[3] = "Three"; |
This file contains hidden or 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 heapq | |
import os | |
class HeapNode: | |
def __init__(self, char, freq): | |
self.char = char | |
self.freq = freq | |
self.left = None | |
self.right = None |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Fetching photos</title> | |
<link href="E:\W\js\timer.css" type="text/css" rel="stylesheet"> | |
</head> | |
<body> | |
<script> | |
var req; | |
function fetchData(){ |