Take FREE!! Online Mettl Mock Test to Crack TechM and Other Companies Written Exams.
Get Off-Campus Placement Jobs Info !!!
Practice Tech Mahindra Essay Topics

Array Programs in JAVA

    21 / 23

    Given a value V, if we want to make a change for V cents, and we have an infinite supply of each of C = { C1, C2, .., Cm} valued coins, what is the minimum number of coins to make the change?

    Input : The first line of input contains an integer T denoting the number of test cases.
    The first line of each test case is V and N,V is the value of cents and N is the number of coins.
    The second line of each test case contains N input C[i],value of available coins.


    Output :

    View Answer |  Array |  Practice Program | Add to Reading List To Reading List | Asked In TCS NQTWipro NLTH |  Experience, Fresher
    Please Login to view the answer

    22 / 23

    In the below given series:


    1, 2, 1, 3, 2, 5, 3, 7, 5, 11, 8, 13, 13, 17, ...


    This series is a mixture of 2 series - all the odd terms in this series form a Fibonacci series and all the even terms are the prime numbers in ascending order.


    Write a program to find the Nth term in this series.
    Note:
    The value N is a Positive integer that should be read from STDIN. The Nth term that is calculated by the program should be written to STDOUT. Other than the value of Nth term, no other characters/strings or message should be written to STDOUT.


    For example, when N = 14, the 14th term in the series is 17. So only the value 17 should be printed to STDOUT.

    Input : 14


    Output :

    View Answer |  Array |  Practice Program | Add to Reading List To Reading List | Asked In TCS NQTWipro NLTH |  Experience, Fresher
    Please Login to view the answer

    23 / 23

    Given a series whose even term creates a separate geometric series and odd term creates another geometric series.


    Write a program to generate such series.For example,1, 1, 2, 2, 4, 4, 8, 8, 16, 16,......

    Input : NA


    Output : NA

    View Answer |  Array |  Practice Program | Add to Reading List To Reading List | Asked In TCS NQTWipro NLTH |  Experience, Fresher
    Please Login to view the answer




You can practice the basics and standard Array programs given at page 3, asked at freshers or experienced level job interview. Practice our hand-picked page 3 Array coding interview questions asked in coding round of various it companies and exams. You can programed these given question in any language, you can post your answer and same time you can review other users answer. It is always recommanded to write your own Array coding questions answer first and then refer others answers. At this page 3 we have covers all the Array coding questions in 2020 and previously asked in their Interview round or coding rounds.