Join Regular Classroom : Visit ClassroomTech

Code Window

Coding Questions | Longest Increasing Subsequence | Codewindow.in

Given an integer array ‘A’, find the length of its longest increasing subsequence (LIS). LIS is a sub-array of the given integer array where the elements are sorted in a monotonic/strict increasing order. Input Format:Input 1: Integer input ‘n'(1<=input1<=1000)Input 2: Integer array ‘A’ input, containing ‘n’ integers. Output Format:Return the length of its LIS. Example …

Coding Questions | Longest Increasing Subsequence | Codewindow.in Read More »

Coding Questions | Pack of Chocolates | Codewindow.in

Ashwin bought a pack of chocolates wherein each of the chocolates a number is printed inside the chocolate cover. He wants to find the maximum product when multiplying those numbers. Give an array A[] that contains both positive and negative integers. Write a program to print the maximum product in a continuous subarray. Example:Input:56 -3 …

Coding Questions | Pack of Chocolates | Codewindow.in Read More »