Skip to content

Instantly share code, notes, and snippets.

View m0rphed's full-sized avatar

Victor Khovanov m0rphed

  • 09:42 (UTC +03:00)
View GitHub Profile
@m0rphed
m0rphed / binarySearchTree.cpp
Last active December 13, 2018 12:25
Implementation of Binary Search Tree
#include <iostream>
#include <utility>
using namespace std;
// templates are for losers!
// (this is a part of task where templates is forbidden)
typedef int ElementType;
struct Node
@m0rphed
m0rphed / stackOnArray.cpp
Last active December 13, 2018 00:13
Array Implementation of Stack Data Structure
#include <iostream>
using namespace std;
typedef int ElementType;
const int maxSize = 101;
class Stack
{
private:
@m0rphed
m0rphed / stackOnDynamicArray.cpp
Last active December 13, 2018 12:49
Dynamic Array Implementation of Stack Data Structure
#include <iostream>
#include <stdexcept>
using namespace std;
// templates are for losers!
// (this is a part of task where templates is forbidden)
typedef int ElementType;
class StackOnArray
@m0rphed
m0rphed / linkedList_smartInsert.cpp
Created December 14, 2018 09:02
Linked List implementation for sorting arrays.
#include <iostream>
using namespace std;
typedef int ElementType;
struct Node
{
ElementType data;
Node *next;
@m0rphed
m0rphed / DoublyLinkedList.cpp
Created December 14, 2018 10:15
Doubly Linked List implementation C++
#include <iostream>
typedef int ElementType;
struct Node
{
ElementType data;
Node *previous;
Node *next;
//
// Created by PARTH GODHANI on 5/3/18.
//
#include<iostream>
#include <list>
using namespace std;
class Graph {
@m0rphed
m0rphed / avl_tree.cpp
Created December 14, 2018 10:20 — forked from codepainkiller/avl_tree.cpp
AVL Tree
#include <iostream>
using namespace std;
class Nodo {
public:
int dato;
int fe; // factor de equilibrio
Nodo* izquierdo;
Nodo* derecho;
@m0rphed
m0rphed / main.cpp
Created January 16, 2019 12:48
Связный список, сохранияющий порядок элементов
// Вставить в непустой список L,
// элементы которого изначально упорядочены по не убыванию их значений,
// новый элемент со значением E так,
// чтобы сохранить упорядоченность элементов списка.
// < Основной файл main.cpp >
#include <iostream>
#include <locale>
#include "modulSpi.h"
@m0rphed
m0rphed / main.cpp
Created January 28, 2019 10:07
Подсчитать количество слов списка, которые оканчиваются той же литерой, что и следующее слово.
// Вариант 39:
// Подсчитать количество слов списка,
// которые оканчиваются той же литерой,
// что и следующее слово.
// Brute-force: (Вариант 1)
// пройтись по тексту -- преобразовать текст в список из слов
// пройтись по списку -- посчитать слова
// вывести счётчик
@m0rphed
m0rphed / Sorting.csx
Created April 19, 2019 13:33
Just an example
namespace ProblemSet01.Task_03
{
using System;
/// <summary>
/// Class provides method for fancy array sorting
/// </summary>
public class ArraySorting
{
/// <summary>