newszine

Maximum Subarray | Array Problem

4 years ago Lalit Bhagtani 0
Problem Statement You have given an array of integers, write a program to find out the contiguous subarray (containing at least one number) having the largest sum. Example  Input :- Output :- 13 Input :- Output :- Read More

Rotate Array | Array Problem

4 years ago Lalit Bhagtani 0
Problem Statement You have given array and an integer K. Write a program to rotate the array to the right by K steps. Example  Input :- and K = 4 Output :- Input :- Read More

Find Pivot Index in Array | Array Problem

4 years ago Lalit Bhagtani 0
Problem Statement Pivot index is defined as an index whose sum of the numbers to the left is equal to the sum of the numbers to the right. You have given an array of integers. Write a program to return the pivot index of the given input array if no such index exists, then return Read More

Move Zeroes to End of Array | Array Problem

4 years ago Lalit Bhagtani 0
Problem Statement You have given an array of integers, write a program to move all 0 to the end of the array while maintaining the relative order of the non zero elements. Note: Implement with O(1) space complexity (in-place) Example  Input :- Output :- Read More

Height Checker | Array Problem | LeetCode 1051

4 years ago Lalit Bhagtani 0
Problem Statement Students are asked to stand in non-decreasing order of their heights for an annual photo. Write a program to find out the minimum number of students that are not standing in the right positions. This is the number of students that must move in order for all students to be standing in a Read More

Find Words That Can Be Formed by Characters | Array Problem

4 years ago Lalit Bhagtani 0
Problem Statement You have given an array of words and a string S. A word is good if it can be formed by using characters from string S (each character can only be used once). Write a program to find out the sum of the length of all good words in the given array. Example  Read More