Skip to content

Instantly share code, notes, and snippets.

#include <iostream>
#include <conio.h>
/*
compressed_sparse_matrix in cpp
author: Morteza Zakeri
date: 2012-10-23
*/
using namespace std;
package btree;
/**
* ***********************************************************************
* Compilation: javac BTree.java Execution: java BTree
*
* B-tree.
*
* Limitations ----------- - Assumes M is even and M >= 4 - should b be an array
/*
*
*
*/
#include <stdio.h>
#include <stdlib.h>
#define MAXSOLUTIONS 5
//---------------------------------------------
/*
* heap_sort.cpp (with array)
* Defines the entry point for the console application.
*/
#include "stdafx.h"
#include <iostream>
#include <vector>
using namespace std;
/*
hanoi_tower in c
author: Abbas Aryanpoor
date: 2012
www.micropedia.ir
*/
#include <iostream>
#include <stdio.h>
#include <conio.h>
/* PHONEBOOK 2011-TC Version(2.5)
By: MORTEZA ZAKERI (m-zakeri@live.com)
[2010-2011 ARAK UNIVERCITY-Computer Group]
www.micropedia.ir
Note: Run this program with Turbo C++3.0 - 3.5
*/
//1-header files...
#include <conio.h>
#include <stdio.h>
#include <string.h>
@m-zakeri
m-zakeri / double_base_palindromes.py
Created March 19, 2018 18:45
solution for problem 36 projecteuler
"""
https://projecteuler.net/problem=36
The decimal number, 585 = 10010010012 (binary), is palindromic in both bases.
Find the sum of all numbers, less than one million, which are palindromic in base 10 and base 2.
(Please note that the palindromic number, in either base, may not include leading zeros.)
"""
count = 0
for i in range(1000000):
integer = str(i)
integer_reverse = integer[::-1]
@m-zakeri
m-zakeri / aa.cc
Last active December 21, 2019 20:43
Some C++ code snips and toy examples used for teaching basic programming.
#include <iostream>
using namespace std;
int main()
{
cout << "Hello world!";
}