Initial commit
Test / gate (push) Failing after 19m0s

This commit is contained in:
alexm committed 2026-11-12 22:23:54 -05:00
commit 401084bab3
265 files changed
+69224

No files matched your search

@@ -0,0 +1,23 @@
# Generated by Programming+ from pseudo. Not reviewed for Mojo best practices.
# Matched is reset in the wrong place.
def match_(p: String, t: String) -> List[Int]:
var n: Int
var m: Int
var matched: Bool
var answer = List[Int]()
n = t.count_codepoints()
m = p.count_codepoints()
matched = True
for i in range(n - m + 1):
for j in range(m):
if String(t[codepoint=i + j]) != String(p[codepoint=j]):
matched = False
break
if matched:
answer.append(i)
return answer.copy()
def main():
print(match_("GC", "GATGCA"))