Skip to content

Instantly share code, notes, and snippets.

View kvedala's full-sized avatar

Krishna Vedala kvedala

View GitHub Profile
@kvedala
kvedala / Project Euler - Problem 14 - Longest Collatz Sequence.ipynb
Last active March 11, 2020 00:28
Project Euler - Problem 14 - Longest Collatz Sequence.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kvedala
kvedala / factorial.c
Last active March 30, 2020 18:11
Factorial using "divide, swing and conquer" algorithm - https://oeis.org/A000142/a000142.pdf
/**
* Factorial algorithm -
* Divide, Swing & Conquer from https://oeis.org/A000142/a000142.pdf
**/
/**
* check if input number is prime.
* Return 1 if prime, otherwise 0
@kvedala
kvedala / c-algorithms.ipynb
Last active July 21, 2020 22:54
Compile and run C Algorithms
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kvedala
kvedala / -sorting-algorithms-quick-sort-and-shell-sort.ipynb
Created April 29, 2020 02:42
Sorting algorithms - Quick sort and Shell sort
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kvedala
kvedala / spirograph.ipynb
Last active July 2, 2020 15:20
Spirograph
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kvedala
kvedala / main.go
Created May 27, 2022 21:03
Generating JWT Tokens with random secret key in golang
package main
import (
"crypto/hmac"
"crypto/sha512"
"fmt"
"log"
"math/rand"
"time"