Skip to content

Instantly share code, notes, and snippets.

@hyojjxipitug
hyojjxipitug / puzzle_251229.py
Last active December 30, 2025 16:38
Answer to interview question from Cassidoo’s newsletter (12/29/25):
def replaceRepeats(s, n):
count = 0
output = ''
for c in s:
if c == str(n):
count += 1
elif count > 0 and c != str(n):
output += str(count)
output += c
count = 0
// https://api.mapbox.com/styles/v1/mapbox/streets-v8/static/0,0,2/600x600?access_token=pk.eyJ1IjoiY29kaW5ndHJhaW4iLCJhIjoiY2l6MDJ0Mjk5MDQ1dzJ3bzRiM29zaW16ayJ9.guiqnHMGUq196Zxa1d3UPg
var mapimg;
var zoom = 1;
var data;
var ww = 1280;
var hh = 1280;
var token = 'pk.eyJ1IjoiaHlvamp4aXBpdHVnIiwiYSI6ImNpejBjZjRqNjAwMWozM3BheWhxMnVzcjUifQ.9uCzXO3rlwFIvi9lp7cT1g';
//var token = 'pk.eyJ1IjoiY29kaW5ndHJhaW4iLCJhIjoiY2l6MDJ0Mjk5MDQ1dzJ3bzRiM29zaW16ayJ9.guiqnHMGUq196Zxa1d3UPg';