Skip to content

Instantly share code, notes, and snippets.

View alimranahmed's full-sized avatar

Al Imran Ahmed alimranahmed

View GitHub Profile
@alimranahmed
alimranahmed / xml-decoder.py
Last active October 29, 2017 02:15
A very simple tool to decode xml. Python's Tkinter library used to build the interface. Python3^ is required.
import html
from tkinter import *
import xml.dom.minidom as dom
# author Al Imran Ahmed
# A very simple interface to decoded xml. i.e. &lttag&gt => <tag>
# requires python3^ with tkinter GUI library installed
class Application(Frame):
def decode_xml(self):
@alimranahmed
alimranahmed / EmailVerifier.php
Last active October 28, 2019 17:55
Some wrap classes to make laravel life easy.
<?php
namespace App\Services\EmailVerify;
use \DOMDocument;
use \DOMXpath;
use Log;
/**
* Verifies email address by attempting to connect and check with the mail server of that account
@alimranahmed
alimranahmed / .vimrc
Last active March 14, 2017 07:52
Minimal .vimrc for programmer without any plugin
"Change the leader key from \\ to comma
let mapleader = ','
"Show line number of row
set number
"Write automatically when close the buffer
set autowriteall
"Limit the Text window with 80 character
@alimranahmed
alimranahmed / insertionSort.c
Created February 10, 2016 11:11
Implementation of insertion sort algorithm using C
/**
* Created by Al- Imran Ahmed
* Sorting an array using insertion sort algorithm
* @param int a[] is an array to be sorted
* @param int size is the size of the array
*/
void insertionSort(int a[], int size){
for(int i = 1; i < size; i++){
for(int j = i; j >= 0; j--){
@alimranahmed
alimranahmed / Queue.php
Last active October 15, 2019 06:20
Queue - Data Structure using PHP
<?php
/**
* Implementation of Queue using PHP
* @author Al- Imran Ahmed
*/
class Element{
public $value;
public $next;
}
@alimranahmed
alimranahmed / Stack.php
Last active January 19, 2016 13:18
Stack - Data Structure using PHP
<?php
/**
* Implementation of Stack using PHP
* @author Al- Imran Ahmed
*/
class Node{
public $value;
public $next;
}
@alimranahmed
alimranahmed / Queue.java
Last active January 9, 2021 11:10
Queue-Data structure using Java(without using library)
/**
* Implementation of Queue using Java
* @author Al- Imran Ahmed
*/
public class Queue<T>{
Node font = null;
Node back = null;
private class Node{
T item;
Node next;
@alimranahmed
alimranahmed / Stack.java
Last active April 6, 2022 06:45
Stack - Data Structure using Java(Without using library)
/**
* A implementation of Stack using Java Generic Programming
* @author Al- Imran Ahmed
*/
public class Stack<T>{
//Top node of the stack
private Node top = null;
Problem Statement
-----------------------------
Find an Array:
Implement a method that given two arrays as parameters will find the starting index where the second parameter occurs as a sub-array in the array given as the first parameter.
Your implementations should return -1 if the sub-array cannot be found.
Your implementation must implement the FindArray interface given bellow: