Skip to content

Instantly share code, notes, and snippets.

View johnifegwu's full-sized avatar

John Ifegwu johnifegwu

View GitHub Profile
@johnifegwu
johnifegwu / LRU Cache.java
Last active November 18, 2020 09:53
Data Structures and Algorithms (Java Implementation)
import java.sql.Timestamp;
import java.util.*;
import java.lang.Math;
//Author: John Ifegwu
class Node {
int key;
@johnifegwu
johnifegwu / LRU Cache.py
Last active November 18, 2020 09:51
Data Structures and Algorithms (Python implementation)
# Author: John Ifegwu
import time
import math
class Node:
def __init__(self, key, value, weight):
self.key = key
self.value = value
self.weight = weight
@johnifegwu
johnifegwu / answer1.java
Last active May 6, 2020 19:01
Answers to Questions 1, 2 and 3.
import java.util.*;
import java.text.CharacterIterator;
//Author: John Ifegwu
public class Program
{
// Determine if set2 is a subset of set1 with Computational Complexity of O(n^ 2)
public static boolean isSubset(char[] set1, char[] set2)
{
@johnifegwu
johnifegwu / answer2.java
Created April 15, 2020 09:00
Question 2 (Java Implementation)
import java.sql.Timestamp;
import java.util.*;
import java.lang.Math;
//Author: John Ifegwu
class Node {
int key;
@johnifegwu
johnifegwu / answer2.py
Last active April 29, 2020 07:47
Question 2 (Python implementation)
# Author: John Ifegwu
import time
import math
class Node:
def __init__(self, key, value, weight):
self.key = key
self.value = value
self.weight = weight
@johnifegwu
johnifegwu / Calculator2.html
Last active April 24, 2020 06:16
HTML 5, CSS and JavaScript Example (Calculator)
<html>
<head>
<style>
.Head
{
font-size:67px;
width:100%;
background:Gray;
color:Silver
}
@johnifegwu
johnifegwu / Calculator.php
Last active April 23, 2020 19:23
PHP, HTML 5, CSS 3 and JavaScript example (Calculator.PHP) Persists data for 7 days utilizing coockie.
<!DOCTYPE html>
<html>
<head>
<style>
.Head
{
font-size:67px;
width:100%;
background:Gray;
color:Silver
@johnifegwu
johnifegwu / Password_Validator.cs
Created April 15, 2020 20:27
Password Validator (C# Implementation)
using System;
using System.IO;
using System.Linq;
using System.Collections.Generic;
//Author: John Ifegwu
namespace MICKLE.Security
{
public class PasswordValidator
@johnifegwu
johnifegwu / Quench_COVID19.py
Created April 15, 2020 09:23
Simple Game (Quench COVID19)
class GameObject:
class_name = ""
desc = ""
objects = {}
def __init__(self, name):
self.name = name
GameObject.objects[self.class_name] = self
@johnifegwu
johnifegwu / Draw_signature.html
Created April 15, 2020 09:19
HTM 5, JavaScript and CSS (Canvas Example) sign your Signature and Save it.
<!-- Created by John Ifegwu-->
<!DOCTYPE HTML>
<html>
<header>
<style>
/* Created by John Ifegwu */
#canvas
{