BMC Software interview question

Mostly algorithm-related coding questions with some code testing runs