Skip to content

Instantly share code, notes, and snippets.

View CBroz1's full-sized avatar
👋

Chris Broz CBroz1

👋
View GitHub Profile
@CBroz1
CBroz1 / CodingChallenge_SerialNumbers.py
Last active January 28, 2023 17:18
Coding Challenge: Return N serial numbers given list of valid chars in each position
"""Coding challenge: Serial numbers | Chris Brozdowski, January 28th 2023
Goal: Create N serial numbers given N and a list of valid characters for each position
in the resulting serial.
Assumptions:
1. Each item in the list will be a string.
2. If a provided string is empty, there are no valid characters for this position.
Output should exclude this position.
3. If N exceeds the number of unique serials, only report unique serials.
import copy
import itertools
import operator
import os
import pickle
from collections import namedtuple
import matplotlib
import matplotlib.pyplot as plt
import numpy as np