• + 1 comment

    Developing an approach: Question is to form lists that have values less than x,y,z respectively and their sum should be less than n. first loop : i < x - first element of list second loop : j < y - second element of list third loop : k < z - third element

    Steps: 1. write loops to satisfy above three conditions 2. Check condition i+j+k!=n