Cognizant interview question

Write a code stating array as accepted if it contains nonconsecutive numbers.

Interview Answer

Anonymous

11 June 2024

First, I explained the solution process and then I wrote the code in notepad.