Triple + Double = So Much Trouble

Published by Pickle in

Create a function that takes two integers and returns true if a digit repeats three times in a row at any place in num1 AND that same digit repeats two times in a row in num2.

Examples

Trouble(451999277, 41177722899) ➞ true

Trouble(1222345, 12345) ➞ false

Trouble(666789, 12345667) ➞ true

Trouble(33789, 12345337) ➞ false

Notes

You can expect every test case to contain exactly two integers.

Watch a quick demo on how Edabit works.