Skip to content

Instantly share code, notes, and snippets.

javascript:(function(){document.body.appendChild(document.createElement('script')).src='https://gist.github.com/allareri/7685975/raw/68a4f0636aa052912b7b575ab6dfbb9300a6b5df/twitter-bookmarklet.js';})();
#include <stdio.h>
#include <stdlib.h>
#include "linked-list.h"
#define ASSERT_TRUE(cond) { \
if (!(cond)) { \
fprintf(stderr, "%s: " #cond " assertion failed\n", __func__); \
} \
}
@ezy023
ezy023 / lossless-compression.go
Created January 29, 2021 00:12
Solution to lossless-compression problem
func losslessDataCompression(inputString string, width int) string {
result := ""
var i int = 0
for i < len(inputString) {
end := i + 1
var begin int
if i < width {
begin = 0
} else {
begin = i - width
package main
func packetDescrambler(seq []int, fragmentData []string, n int) string {
maxSeqIdx := func(numSlice []int) int {
max := numSlice[0]
for _, n := range numSlice[1:] {
if n > max {
max = n
}
}