MCPcopy Create free account
hub / github.com/Freeze777/SDE-Interviewer-Notes / resize

Function resize

ProblemSolving/Hard/Strings/StringCompression.py:41–44  ·  view source on GitHub ↗
(arr, lone_char_count, total_empty_slots)

Source from the content-addressed store, hash-verified

39
40
41def resize(arr, lone_char_count, total_empty_slots):
42 if total_empty_slots < lone_char_count:
43 arr += [''] * (lone_char_count - total_empty_slots)
44 return arr
45
46
47def right_shift_empty_slots(arr):

Callers 1

string_compressionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected