diff --git a/GeeksForGeeks/March/15-3-24/GFG.java b/GeeksForGeeks/March/15-3-24/GFG.java new file mode 100644 index 0000000..bc05bb0 --- /dev/null +++ b/GeeksForGeeks/March/15-3-24/GFG.java @@ -0,0 +1,110 @@ +//{ Driver Code Starts +/*package whatever //do not write package name here */ + +import java.io.*; +import java.util.*; + +class Node { + int data; + Node next; + + public Node (int data){ + this.data = data; + this.next = null; + } +} + +class GFG { + static void printList(Node node) + { + while (node != null) + { + System.out.print(node.data + " "); + node = node.next; + } + System.out.println(); + } + public static void main (String[] args) { + Scanner sc = new Scanner(System.in); + int t = sc.nextInt(); + while(t-- > 0){ + int n = sc.nextInt(); + + Node head = new Node(sc.nextInt()); + Node tail = head; + + for(int i=1; i= 0; --i) + { + ans[i] *= suffix; + suffix *= nums[i]; + } + + return ans; + } +}