Brain Technosys interview question

They asked me one pattern program and one probability related question