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
#ifndef DANI_SIMPLE_LIST_H_ | |
#define DANI_SIMPLE_LIST_H_ | |
/* | |
Singly Linked List generic implementation using templates. | |
Author: Daniela Petruzalek (https://gist.github.com/danicat) | |
Date : October, 20th 2013 | |
*/ |
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
#ifndef DANI_SIMPLE_TREE_H_ | |
#define DANI_SIMPLE_TREE_H_ | |
/* | |
Simple Binary Search Tree generic implementation using templates. | |
Depends: list.h (see github for newest version). | |
Author: Daniela Petruzalek (https://gist.github.com/danicat) | |
Date : October, 20th 2013 |
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
#ifndef DANI_SIMPLE_HASHTABLE_H_ | |
#define DANI_SIMPLE_HASHTABLE_H_ | |
/* | |
Simple Hash Table generic implementation using templates. | |
The underlying collection for storing hash collisions is a binary search tree. | |
Depends: tree.h (see github for newest version). | |
Author: Daniela Petruzalek (https://gist.github.com/danicat) |
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
#ifndef DANI_AVL_TREE_H_ | |
#define DANI_AVL_TREE_H_ | |
/* | |
Balanced Binary Search Tree using AVL algorithm. | |
Depends: list.h (see github for newest version). | |
Author: Daniela Petruzalek (https://gist.github.com/danicat) | |
Date : October, 20th 2013 |
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 <vector> | |
#include <string> | |
#include <iostream> | |
using std::vector; | |
using std::string; | |
const string kNone = "NONE"; | |
class BinaryCode { |
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 <vector> | |
#include <string> | |
#include <sstream> | |
using std::vector; | |
using std::string; | |
using std::stringstream; | |
class Time { | |
public: |
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 <vector> | |
using std::vector; | |
class PowerOutage { | |
public: | |
int estimateTimeOut(vector<int> fromJunction, vector<int> toJunction, vector<int> ductLength) { | |
int max_minutes = 0; | |
for(auto p : ductLength) { |
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 <vector> | |
#include <string> | |
using std::vector; | |
using std::string; | |
class ImageDithering { | |
public: | |
int count(string dithered, vector<string> screen) { | |
int c = 0; |
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 <string> | |
#include <vector> | |
#include <sstream> | |
using std::string; | |
using std::vector; | |
using std::stringstream; | |
class ExerciseMachine { | |
public: |
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 <vector> | |
#include <algorithm> | |
using namespace std; | |
class TheProgrammingContestDivTwo { | |
public: | |
vector<int> find(int T, vector<int> requiredTime) { | |
vector<int> res; | |
OlderNewer