Skip to content

Instantly share code, notes, and snippets.

View kg86's full-sized avatar

kg kg86

  • LegalOn Technologies
  • Tokyo, Japan
View GitHub Profile
class ColorfulChocolates {
public:
int maximumSpread(string chocolates, int maxSwaps) {
int n = chocolates.size();
int ms[26][n];
int i, j, k;
for(i = 0; i < 26; i++){
for(j = 0; j < n; j++){
ms[i][j] = 0;
}
@kg86
kg86 / pull_all.py
Created July 2, 2016 06:56
git pull for all subdirectories
from __future__ import print_function
import os
import subprocess
def main():
cmd = 'git pull'
dir = os.getcwd()
for subdir in os.listdir(dir):
if os.path.isdir(subdir) and os.path.exists(subdir):