Given two string arrays s1[] and s2[]. The task is to find the count of pairs (s1[i], s2[j]) such that s1[i] = s2[j]. Note that… Read More »

Given an array arr[] and an integer K, the task is to find the count of pairs (arr[i], arr[j]) from the array such that |arr[i]… Read More »

Given a string str consisting of uppercase and lowercase characters. The task is to sort uppercase and lowercase characters separately such that if the ith… Read More »

Given a string str and a character ch, the task is to find the longest palindromic sub-string of str such that it starts and ends… Read More »

Hello GATE 2020 Aspirants ! GATE exam is just a few months away, so GeeksforGeeks is here to help you gauge your GATE preparation and… Read More »

Given an integer N, the task is convert and print the binary equaiva;ent of N. Examples: Input: N = 13 Output: 1101 Input: N =… Read More »

Given an integer N, the task is to find an integer M formed by taking the rightmost set bit in N i.e. the only set… Read More »

Given a linked list which represents an integer number where every node is a digit if the represented integer. The task is to add a… Read More »

Pointers in Go programming language or Golang is a variable which is used to store the memory address of another variable. Pointers in Golang is… Read More »

Given a preorder sequence of the binary search tree of N nodes. The task is to find its leftmost and rightmost node. Examples: Input :… Read More »

Given a matrix mat[][] of size m * n which is sorted in row-wise fashion and an array row[], the task is to check if… Read More »

Given an array arr[] of N integers, the task is to sort the array without changing the position of negative numbers (if any) i.e. the… Read More »

Given a directed, unweighted graph with N vertices and an integer K. The task is to find the number of paths of length K for… Read More »

Given an integer N and valid subsequences of an array of integers where every element is distinct and from the range [0, N – 1],… Read More »

Given an array arr[] of n integers. The task is to find the smallest perfect cube from the array. Print -1 if there is no… Read More »

Given an integer N and the sum of its divisors. The task is to find the sum of the inverse of the divisors of N.… Read More »

Most of us have C++ as our First Language but when it comes to something like Data Analysis and Machine Learning, Python becomes our go-to… Read More »

I attended the Amazon Recruitment drive for freshers in Bangalore. First 3 rounds were F2F pen-paper coding rounds of 45 mins each. Round 1: … Read More »

Given a linked list and an integer K, the task is to reverse every alternate K nodes. Examples: Input: 1 -> 2 -> 3 ->… Read More »

Dropdowns are one of the important components that are an integral part of any web application. Bootstrap provides its own interactive version of this component.… Read More »