Given a Binary Tree, the task is to perform Specific Level Order Traversal of the tree such that at each level print 1st element then… Read More » The post Specific Level Order Traversal of Binary Tree appeared first on GeeksforGeeks.

1h

Given an array arr[] of size N and a matrix Q consisting of queries of the following two types: 1 L R : Print the… Read More » The post Queries for count of array elements with values in given range with updates appeared first on GeeksforGeeks.

1h

Prerequisites: Policy based data structure, Sliding window technique. Given an array of integer arr[] and an integer K, the task is to find the median… Read More » The post Median of sliding window in an array | Set 2 appeared first on GeeksforGeeks.

1h

Given an undirected graph defined by the number of vertex V and the edges E[ ], the task is to find Maximal Independent Vertex Set… Read More » The post Maximal Independent Set in an Undirected Graph appeared first on GeeksforGeeks.

1h

Given an array arr[] of length N and an integer K, the task is to find the longest subarray with difference between any two distict… Read More » The post Longest subarray with difference exactly K between any two distinct values appeared first on GeeksforGeeks.

1h

Given a squared matrix M[ ][ ] of N * N dimensions, the task is to find the Kth diagonal of the matrix, starting from… Read More » The post Kth diagonal from the top left of a given matrix appeared first on GeeksforGeeks.

1h

Given an array arr[], the task is to maximize the sum of even-indexed elements by reversing a subarray and print the maximum sum obtained. Examples:… Read More » The post Reverse a subarray to maximize sum of even-indexed elements of given array appeared first on GeeksforGeeks.

1h

Given an array arr[] of N positive integers where the integers are in the range from 1 to N, the task is to check whether… Read More » The post Check if frequency of each element in given array is unique or not appeared first on GeeksforGeeks.

1h

Given an array freq[] which stores the frequency of N integers from 0 to N – 1. The task is to construct a sequence where… Read More » The post Construct a sequence from given frequencies of N consecutive integers with unit adjacent difference appeared first on GeeksforGeeks.

6h

Given a string str and two characters X and Y, the task is to write a recursive function to replace all occurrences of character X… Read More » The post Replace all occurrences of character X with character Y in given string appeared first on GeeksforGeeks.

6h

Subscribe to RSS Feeds, Blogs, Podcasts, Twitter searches, Facebook pages, even Email Newsletters! Get unfiltered news feeds or filter them to your liking.

Get Inoreader