Skip to content
Courses
DSA to Development
Get IBM Certification
Newly Launched!
Master Django Framework
Become AWS Certified
For Working Professionals
Interview 101: DSA & System Design
Data Science Training Program
JAVA Backend Development (Live)
DevOps Engineering (LIVE)
Data Structures & Algorithms in Python
For Students
Placement Preparation Course
Data Science (Live)
Data Structure & Algorithm-Self Paced (C++/JAVA)
Master Competitive Programming (Live)
Full Stack Development with React & Node JS (Live)
Full Stack Development
Data Science Program
All Courses
Tutorials
Data Structures & Algorithms
ML & Data Science
Interview Corner
Programming Languages
Web Development
CS Subjects
DevOps And Linux
School Learning
Practice
Build your AI Agent
GfG 160
Problem of the Day
Practice Coding Problems
GfG SDE Sheet
Contests
Accenture Hackathon (Ending Soon!)
GfG Weekly [Rated Contest]
Job-A-Thon Hiring Challenge
All Contests and Events
DSA
Practice Problems
Python
C
C++
Java
Courses
Machine Learning
DevOps
Web Development
System Design
Aptitude
Projects
Sign In
▲
Similar Topics
DSA
22.4k+ articles
Mathematical
7.7k+ articles
Arrays
6.4k+ articles
Greedy
2k+ articles
Recursion
1k+ articles
array-rearrange
460+ articles
GCD-LCM
330+ articles
QA – Placement Quizzes
300+ articles
QA - Placement Quizzes
270+ articles
QA - Placement Quizzes-HCF
11 articles
HCF
91 posts
Popular Articles
Recent Articles
Maximum GCD of two numbers possible by adding same value to them
Last Updated: 11 August 2021
Given two numbers A and B, the task is to find the maximum Greatest Common Divisors(GCD) that can be obtained by adding a number X to both A
...read more
Greedy
Mathematical
HCF
DSA
Count of non co-prime pairs from the range [1, arr[i]] for every array element
Last Updated: 10 November 2021
Given an array arr[] consisting of N integers, the task for every ith element of the array is to find the number of non co-prime pairs from
...read more
Arrays
Mathematical
HCF
prefix-sum
euler-totient
DSA
Sort an array in increasing order of GCD of their digits
Last Updated: 11 January 2023
Given an array arr[] consisting of N positive integers, the task is to sort the array arr[] according to the increasing order of GCD of digi
...read more
Arrays
Sorting
Mathematical
array-rearrange
HCF
DSA
Similar Topics
DSA
22.4k+ articles
Mathematical
7.7k+ articles
Arrays
6.4k+ articles
Greedy
2k+ articles
Recursion
1k+ articles
array-rearrange
460+ articles
GCD-LCM
330+ articles
QA – Placement Quizzes
300+ articles
QA - Placement Quizzes
270+ articles
QA - Placement Quizzes-HCF
11+ articles
Modify array by replacing elements with their farthest co-prime number from a given range
Last Updated: 13 September 2021
Given an array arr[] consisting of N integers and two positive integers L and R, the task is to find the farthest co-prime number in the ran
...read more
Arrays
Misc
Mathematical
array-rearrange
HCF
DSA
Modify array such that the array does not contain any common divisors other than 1
Last Updated: 14 February 2022
Given an array arr[] consisting of N integers and an integer X, the task is to check if it is possible to modify the array such that the arr
...read more
Arrays
Mathematical
Technical Scripter
array-rearrange
HCF
divisors
Technical Scripter 2020
DSA
Maximum GCD of all nodes in a connected component of an Undirected Graph
Last Updated: 16 May 2022
Given an undirected graph consisting of V vertices and a 2d array E[][2] denoting edges between pairs of nodes. Given another array arr[] re
...read more
Graph
Mathematical
DFS
graph-connectivity
Recursion
HCF
connected-components
DSA
Minimize steps required to make two values equal by repeated division by any of their prime factor which is less than M
Last Updated: 16 June 2021
Given three positive integers M, X, and Y, the task is to find the minimum number of operations required to make X and Y equal such that in
...read more
Arrays
Mathematical
sieve
prime-factor
Prime Number
Recursion
HCF
factor
DSA
Split an array into equal length subsequences consisting of equal elements only
Last Updated: 14 May 2021
Given an array arr[] of size N, the task is to check if it is possible to split the array arr[] into different subsequences of equal size su
...read more
Arrays
Greedy
Mathematical
Hash
subsequence
HCF
cpp-map
partition
DSA
Count all possible values of K less than Y such that GCD(X, Y) = GCD(X+K, Y)
Last Updated: 14 April 2021
Given two integers X and Y, the task is to find the number of integers, K, such that gcd(X, Y) is equal to gcd(X+K, Y), where 0 K Y.Example
...read more
Mathematical
Technical Scripter
HCF
euler-totient
Technical Scripter 2020
DSA
Construct an array of first N natural numbers such that every adjacent pair is coprime
Last Updated: 09 December 2022
Given a positive integer N, the task is to construct an array consisting of first N natural numbers such that each pair of adjacent elements
...read more
Greedy
Mathematical
HCF
DSA
Count ways to split array into two subarrays with equal GCD
Last Updated: 22 November 2021
Given an array, arr[] of size N, the task is to count the number of ways to split given array elements into two subarrays such that GCD of b
...read more
Arrays
Misc
Mathematical
array-rearrange
subarray
HCF
prefix
DSA
XOR of array elements whose modular inverse with a given number exists
Last Updated: 19 April 2021
Given an array arr[] of length N and a positive integer M, the task is to find the Bitwise XOR of all the array elements whose modular inver
...read more
Arrays
Greedy
Mathematical
Bitwise-XOR
Modular Arithmetic
HCF
number-theory
DSA
Product of all numbers up to N that are co-prime with N
Last Updated: 04 December 2023
Given an integer N, the task is to find the product of all the numbers from the range [1, N] that are co-prime to the given number N.Example
...read more
Mathematical
prime-factor
School Programming
HCF
DSA
Check if an array can be split into subarrays with GCD exceeding K
Last Updated: 20 April 2021
Given an array arr[] of N integers and a positive integer K, the task is to check if it is possible to split this array into distinct contig
...read more
Arrays
Greedy
Searching
Mathematical
GCD-LCM
subarray
divisibility
HCF
DSA
QA - Placement Quizzes | HCF | Question 5
Last Updated: 28 June 2021
Express 1095/1168 in its simplest form.(A) 13/16(B) 15/16(C) 17/26(D) 25/26 Answer: (B) Explanation: Quiz of this QuestionPlease comment bel
...read more
QA - Placement Quizzes
QA – Placement Quizzes
QA - Placement Quizzes-HCF
HCF
First
1
2
3
4
5
6
7
>>
Last
First
1
2
3
4
5
6
>>
Last
First
1
2
3
4
>>
Last
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !