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> | |
#include <stdio.h> | |
using namespace std; | |
struct HashNode; | |
int Insert(vector<HashNode> *&table, HashNode elem); | |
typedef unsigned int int_t; | |
struct HashNode { |
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 <vector> | |
#include "math.h" | |
using namespace std; | |
#define INT_MAX1 2147483647 | |
class Elem{ | |
public: | |
int color; |
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 <vector> | |
using namespace std; | |
struct CNode { | |
CNode(int k) : | |
key(k), height(1), count(1), | |
Left(NULL), Right(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
#include <iostream> | |
using namespace std; | |
struct CNode { | |
CNode(int k) : | |
key(k), left(NULL), right(NULL), height(1) | |
{ | |
} | |
int key; |
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<math.h> | |
#include<iostream> | |
#include<utility> | |
struct Pair { | |
int elem; | |
int index; | |
Pair(int e, int i) : elem(e), index(i) {} | |
Pair() : elem(0), index(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
Обоснования применения технологий | |
# REDIS | |
Обоснование выбора технологии: | |
Небходимость хранить теги | |
Нужны каналы для риалтайм сообщений | |
Использовано в качестве: | |
Теги | |
Реляционные БД не очень подходят для хранения тегов |
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 <stdio.h> | |
class Tree { | |
protected: | |
class Node { | |
private: | |
int _value; |
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 <stdio.h> | |
using namespace std; | |
class Node { | |
private: | |
int _value; | |
Node *_left; | |
Node *_right; | |
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 <stdio.h> | |
#include <vector> | |
class Impact; | |
struct Circle | |
{ | |
float x, y, r; | |
}; |
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 <stdio.h> | |
#include <stdint.h> | |
#include <algorithm> | |
#include <vector> | |
int size = 0; | |
void Heapify(int* arr, int i) { | |
int left = 2 * i + 1; int right = 2 * i + 2; // Ищем большего сына, если такой есть. | |
int largest = i; | |
if (left < size && arr[left] > arr[i]) |