Wiley Interview Question

Write a code to find counts of triplets in a sentence