Given a date in GregorianCalendar format change it into SimpleDateFormat. Examples: Input: Sat Apr 28 13:36:37 UTC 2018 Output: 28-Apr-2018 Input: Wed Apr 03 20:49:45… Read More »

Input text autocomplete is the default feature of any browser. While working with the form or input fields in HTML web page autocomplete feature of… Read More »

Given an undirected graph g, the task is to print the number of connected components in the graph. Examples: Input: Output: 3 There are three… Read More »

Given a number, the task is to find the Sum of Digits of this number using Command Line Arguments. Examples: Input: num = 687 Output:… Read More »

Given three integers N, X and Y. The task is to find N positive integers that satisfy the given equations. a12 + a22 + ….… Read More »

Given an integer k and a linked list, every node of which consists of a pair of integer variable first and second to hold the… Read More »

There are three types of variables in Java: Local Variables Instance Variables Static Variables The Local variables and Instance variables are together called Non-Static variables.… Read More »

Given a person who is at position current_pos and a binary string path which is the moves the person took, if path[i] = ‘0’ then… Read More »

Given a string str, the task is to find the count of all the sub-strings of length four whose characters can be rearranged to form… Read More »

1. Bubble Sort Bubble sort repeatedly compares and swaps(if needed) adjacent elements in every pass. In i-th pass of Bubble Sort (ascending order), last (i-1)… Read More »

Given an array arr[], the task is increment all the odd positioned elements by 1 and decrement all the even positioned elements by 1. Examples:… Read More »

With the help of Numpy ndarray.T object, we can make a Transpose of an array having dimension greater than or equal to 2. Syntax :… Read More »

Barclays recently visited my Campus. Eligibility criteria was cgpa > 7 and no live backlog . Only Comp and IT were allowed . Around 120… Read More »

Round 1:Online Test The coding round had two questions 1 was quite hard which was DP problem no one was able to solve it other… Read More »

Given an array arr[] of digits and an integer K, the task is to find num(arr) + K where num(arr) is the number formed by… Read More »

Given a linked list, the task is to find the sum of all the nodes which are greater than the node next to them. Note… Read More »

Given two integers N and M. The task is to find the minimum number of steps to reach M from N by performing given operations.… Read More »

Given a sorted array arr[] of distinct elements which is rotated at some unknown point, the task is to find the maximum element in it.… Read More »

Given two arrays arr1[] and arr2[]. The task is to count the distinct sums that can be obtained while choosing a prime element from arr1[]… Read More »

Given a linked list, the task is to find the sum of even and odd nodes in it separately. Examples: Input: 1 -> 2 ->… Read More »