Company: Trilogy Innovations Sde intern Oncampus_17july

Difficulty: medium

Problem Statement

You are given two huge integers represented by linked lists. Each linked list element is a number from 0 to 9999 that represents a number with exactly 4 digits. The represented number might have leading zeros. In other words, if a list is [e 0 , e 1 , ..., e k-1 ] then the value it represents is the decimal number formed by writing e 0 followed by every other element padded to exactly 4 digits: [9876, 5432, 1999] -> 9876 5432 1999 -> 987654321999 [123, 4, 5] -> 123 0004 0005 -> 12300040005 Your task is to add up these two huge integers and print the result in the same format, without leading zeros. Input Format The first line contains an integer n , the number of elements of the first list. The second line contains n space-separated integers, the elements of the first list, most significant element first. The third line contains an integer m , the number of elements of the second list. The fourth line contains m space-separated integers, the elements of the second list, most significan

More Trilogy Innovations Sde intern Oncampus_17july OA questionsInterview experiences