Time to Prepare for on-site Interview with My Dreamy

Find ALL Anagrams in a String example: s: “cbaebabacd” p: “abc” output:[0,6] #It is apparently a index #Sliding Window with HashMap def findAnagrams(s: str,p: str): ns,np = len(s), len(p) if ns < np: return [] p_count = Counter(p) s_count = Counter() output = [] for i in range(ns): s_count[s[i]] +=1... [Read More]

Phone Interview about Network Engineer

Okya, I did not post immediately after the phone interview cuz I was tired from my trip to Ottawa. I was meant to go to the career fair in ottawa, but I ended up studying at the University of Ottawa. I think that time I was studying a real case... [Read More]

Unit Testing

Before talking about what is unit testing, I still gonna be finishing off my implementation of python regular expression. vrf_list = ["vrf" + s for s in text.strip().split("vrf") if s] return_dict = {} for vrf in vrf_list: #parse the VRF name from the definition line name_regex = re.compile(r"vrf\s+definition\s+(?P<name>\S+)") sub_dict =... [Read More]