Skip to content

Instantly share code, notes, and snippets.

View kuldeeprishi's full-sized avatar
🎯
Focusing

Kuldeep Rishi kuldeeprishi

🎯
Focusing
View GitHub Profile
@kuldeeprishi
kuldeeprishi / threaded_simple_httpserver.py
Created April 18, 2017 05:07
Threaded Simple HTTPServer
#!/bin/env python
import sys
import SocketServer
import BaseHTTPServer
import SimpleHTTPServer
class ThreadingSimpleServer(SocketServer.ThreadingMixIn,
BaseHTTPServer.HTTPServer):
@kuldeeprishi
kuldeeprishi / the_colorful_street.py
Created December 16, 2018 03:45
The colorful street
import sys
def find_cost():
testcases = int(sys.stdin.readline())
for x in range(testcases):
num_of_houses = int(sys.stdin.readline())
cost_of_color = cost_table(num_of_houses)
dp = [[0 for i in range(3)] for i in range(num_of_houses)]
for i in range(3):
dp[0][i] = cost_of_color[0][i]