Skip to content

Instantly share code, notes, and snippets.

View LordRahl90's full-sized avatar

Alugbin Abiodun Olutola LordRahl90

  • CodeBoulevard systems Inc
  • Nigeria, West Africa
  • X @LordRahl90
View GitHub Profile
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAwMAAAGQCAYAAADyT7znAAAYLmlDQ1BJQ0MgUHJvZmlsZQAAWIWVWQk4Vd27X/vsM5vnIcMxy5B5zjzPkjnimOfhGJJkyqdCRaREpBmhMqVIGZJIUkhRJBmSqZAUdxvq+/7fvc+9z13Ps/f+ede73vVba71rvet1ANjBTA4NDUTRAxAUHEGxNtQhOTg6kXAjAANQgAi4gQrZIzxU28rKDCDl9/c/y1IfgDa+LyU3bP33+v+1MHh6hXsAAFkh2N0z3CMIwVUAoNk9QikRAGA6EbnAgYjQDTyHYGYKQhAALHoD+2xh9g3svoUlNnVsrHURrAUAnppMpvgAQLvBmxTl4YPYoUU4YhmDPf2CEdUEBGt4+JI9AeB8iOhIBAWFbOBpBIu6/8OOz3/YdP9jk0z2+YO3xrJZ8Hp+4aGB5IP/z+n4v0tQYOTvPviRh9qXYmS9MWZk3m4EhJhuYGoE1we7W1gimBHBT/w8N/U38BvfSCPbbf1pj3BdZM4AK0AW25OsZ4pgLgSzRgbYam9jWTJlsy2ij7LwizC22cbulBDrbfuoqOBAC7NtO8d8vYx/4wKvcP29v3W8/QyMEYx4GqoqxtfGfosnqiXKz84CwbQI7g4P2Gu63fZdjK+uxW8dSqT1BmdBBH/zphhYb+nA7EHhv8cF7/Igb/aF+AKsFeFrY7TVFnbwCncw+83B00tPf4sD7OkVbLvNDUa8S8d6u21KaKDVtj5c4BVoaL01z/Ct8Ki9v9v2RCAOtjUP8Ad/sonVdl9LoRFWNlvc0ChgBnSBHiCBSORxByHAH/h1TddOI39t1RgAMqAAH+AFJLclv1vYb9YEI++9IAZ8QZAXCP/TTmez1gtEIfJff6Rbb0ngvVkbtdkiAHxCcBCaE62BVkObIW8t5JFFK6NVfrcj0f3uFauP1cMaYQ2wO//w8EBYByIPBfj9DzJT5OuFjG6DS/DvMfxtD/MJ8wLzAdOLGc
@LordRahl90
LordRahl90 / OddOccurrencesInArray.php
Last active November 16, 2019 09:07
Odd Occurrence in Array Solution in php
function solution($A) {
// write your code in PHP7.0
$values=array_count_values($A);
foreach($values as $key=>$value){
if(($value % 2===1)){
return $key
}
}
@LordRahl90
LordRahl90 / LinkedList.go
Last active October 31, 2018 08:45
Attempt to create a linked list in golang. Well, I have issues with the insertBefore. Working on the delete node as well.
package main
import (
"fmt"
)
func main() {
llist := &LinkedList{}
llist.Head = &Node{Data: 10}
@LordRahl90
LordRahl90 / Queue.java
Last active November 1, 2018 10:56
My Attempt at implementing a queue based on my understanding of linked list in java. Will try to replicate this in golang soon enuf.
public class Queue{
private Node head;
private int length;
public void printQueue(){
Node n=this.head;
while(n!=null){
System.out.println(n.data+"");
@LordRahl90
LordRahl90 / Stack.java
Last active November 1, 2018 11:30
Implementation of stack with java. Hoping to push golang with this understanding soon.
public class Stack{
private Node head;
//I Prefer this to having to walk the length of the stack everytime.
private int length=0;
@LordRahl90
LordRahl90 / Node.java
Created November 1, 2018 10:50
This is a node for a singly linked list. It only has information about the next value.
public class Node{
int data;
Node next;
Node(int d){
data=d;
}
}
@LordRahl90
LordRahl90 / README-Template.md
Created November 21, 2018 13:40 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@LordRahl90
LordRahl90 / main.go
Created March 4, 2019 22:41
Producer consumer Implementation in go-lang
package main
import "fmt"
func producer(p chan int, items int) {
defer close(p)
for i := 1; i <= items; i++ {
fmt.Println("Produer Producing ", i)
p <- i
}
@LordRahl90
LordRahl90 / main.go
Last active March 5, 2019 10:28
Even Fibonacci Implementation Project Euler #2
func chanFib(n int, f chan int) {
fmt.Println("N is: ", n)
defer close(f)
i, j := 0, 1
for {
temp := i + j
f <- i + j
j, i = i+j, j
if temp >= n {