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
@LordRahl90
LordRahl90 / main.go
Last active March 5, 2019 12:32
Biggest Palindrome, Project Euler #4
package main
import "fmt"
func flip(n int) int {
var v int
for n != 0 { //to make it cater for negative numbers
remainder := n % 10
v = v*10 + remainder
n /= 10
@LordRahl90
LordRahl90 / main.go
Last active March 5, 2019 13:03
Smallest Multiple Problem. Project Eular #5
package main
import "fmt"
func solution() int {
var min int
num := 21
found := false
for !found {
var clean bool
@LordRahl90
LordRahl90 / main.go
Last active March 5, 2019 13:04
Sum Square Difference project euler #6
package main
import "fmt"
func solution(limit int) int {
sum, ssq := 0, 0
for i := 1; i <= limit; i++ {
square := i * i
ssq += square
sum += i
@LordRahl90
LordRahl90 / main.go
Created March 5, 2019 13:32
10001's Prime Number, Project Euler #7
package main
import "fmt"
func solution(index int) int {
num, counter, val := 2, 0, 0
for {
var clean = true
for i := 2; i <= num-1; i++ {
@LordRahl90
LordRahl90 / main.go
Created March 20, 2019 14:30
Testing Psql With console go application. This is a simple console address book. I know the db details aren't supposed to be in the code. I'm just trying it out,
package main
import (
"bufio"
"database/sql"
"fmt"
"os"
"strconv"
_ "github.com/lib/pq"
@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
}
}