Capgemini Interview Question

Written Test- 1. Bubble sorting elements 2. calculating count of common letters in a string