Skip to content

Instantly share code, notes, and snippets.

View kchromik's full-sized avatar
🤓

Kevin Chromik kchromik

🤓
View GitHub Profile
@kchromik
kchromik / coding_challenge.py
Created April 29, 2023 14:15
Coding Challenge Python
import random
class RandomWordGenerator:
def __init__(self):
self.graph = {}
self.first_letters = set()
self.last_letters = set()
def insert(self, words):
for word in words:
@kchromik
kchromik / Coding Interview Video
Created April 28, 2023 11:05
Coding Interview Video
import Foundation
class RandomWordGenerator {
private var graph: [Character: Set<Character>] = [:]
private var firstLetters: Set<Character> = []
private var lastLetters: Set<Character> = []
func insert(words: [String]) {
words.forEach { word in
guard !word.isEmpty else { return }
import argparse
import time
import os
def show_notification(title, subtitle, message):
# Play alert sound
os.system('afplay /System/Library/Sounds/Glass.aiff')
# Show notification
os.system("""
NSArray *items;
MPMediaPropertyPredicate *predicate = [MPMediaPropertyPredicate predicateWithValue:@(MPMediaTypeHomeVideo) forProperty:MPMediaItemPropertyMediaType];
MPMediaQuery *query = [[MPMediaQuery alloc] init];
[query addFilterPredicate:predicate];
items = [query items];
- (void)viewDidLoad
{
[self buildCameraRollLibrary];
}
- (NSInteger)collectionView:(UICollectionView *)view numberOfItemsInSection:(NSInteger)section;
{
return itemList.count;
}