wes d2a2ba9e15 first commit 4 years ago
..
README.md d2a2ba9e15 first commit 4 years ago
code.cpp d2a2ba9e15 first commit 4 years ago
unitTest.cpp d2a2ba9e15 first commit 4 years ago

README.md

Triple + Double = So Much Trouble

by Matt tags: validation, algorithms, regex

Summary

Create a function that takes two integers and returns true if a number repeats three times in a row at any place in num1 AND that same number 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 c

Instructions

Create a function that takes two integers and returns true if a number repeats three times in a row at any place in num1 AND that same number 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.