Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Morteza Zakeri m-zakeri

🎯
Focusing
View GitHub Profile
View compressed_sparse_matrix.cpp
#include <iostream>
#include <conio.h>
/*
compressed_sparse_matrix in cpp
author: Morteza Zakeri
date: 2012-10-23
*/
using namespace std;
View BTree.java
package btree;
/**
* ***********************************************************************
* Compilation: javac BTree.java Execution: java BTree
*
* B-tree.
*
* Limitations ----------- - Assumes M is even and M >= 4 - should b be an array
View sudoku.c
/*
*
*
*/
#include <stdio.h>
#include <stdlib.h>
#define MAXSOLUTIONS 5
//---------------------------------------------
View heap_sort.cpp
/*
* heap_sort.cpp (with array)
* Defines the entry point for the console application.
*/
#include "stdafx.h"
#include <iostream>
#include <vector>
using namespace std;
View hanoi_tower.c
/*
hanoi_tower in c
author: Abbas Aryanpoor
date: 2012
www.micropedia.ir
*/
#include <iostream>
#include <stdio.h>
#include <conio.h>
View phonebook.c
/* 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 Mar 19, 2018
solution for problem 36 projecteuler
View double_base_palindromes.py
"""
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 Dec 21, 2019
Some C++ code snips and toy examples used for teaching basic programming.
View aa.cc
#include <iostream>
using namespace std;
int main()
{
cout << "Hello world!";
}