InterviewBit Problems   Simple Queries : Solved

Simple Queries not so simple (6)
TLE : stuck wtih the time limit (2)
Segmentation fault for larger test cases (2)
Whats wrong in this simple querie (3)
How can I optimize memory with below solution (2)
Solution failing for larger test cases (2)
Unable to find my mistake (4)
Can someone please tell me what's wrong with my code? (3)
About simple queries (1)
What's wrong with my solution? (1)