Skip to content

Instantly share code, notes, and snippets.

@lyquocphong
lyquocphong / minsubstring.php
Created Jan 21, 2021
Minimum window substring
View minsubstring.php
<?php
$str = 'abbaacdbcab';
$chars = ['a', 'b', 'c'];
echo "Expected: bca | Result: ".findMinWinSubString($str, $chars)."\n";
$str = 'xyyzyzyx';
$chars = ['x', 'y', 'z'];