1.take input txt as argument; 2. triangle O(n3) method