AfterAcademy Tech
Merge two sorted linked lists and return it as a new sorted list. The new list should be made by splicing together the nodes of the first two lists.
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contains a single digit. Add the two numbers and return it as a linked list.
Given an array A[] of n integer elements, find the length of the longest subarray with sum equals to 0.
Given a matrix, A of size M x N of 0's and 1's. If an element is 0, set its entire row and column to 0
Given the root of a binary tree, check whether it is a binary search tree or not.
Given an array A[] of n elements filled with several integers, some of them being zeroes, you need to move all the zeroes to the end.
You are given a string S and its length L and you need to sort its characters based on their frequency. The characters in the output will be distinct and ordered based on their frequency in S, higher frequency comes first.
Given an array A[] of size n, find the most frequent element in the array, i.e. the element which occurs the most number of times.
Given an array A[] of size n, you need to find the next greater element for each element in the array. Return an array that consists of the next greater element of A[i] at index i.
You are given an array A[] consisting of n elements. You need to find and return the number which appears more than n/2 times.