geeksforgeeks
search icon
  • Courses
  • Tutorials
  • Practice
  • Jobs
  • DSA
  • Practice Problems
  • C
  • C++
  • Java
  • Python
  • JavaScript
  • Data Science
  • Machine Learning
  • Courses
  • Linux
  • DevOps
C/C++ Program to Find the Number Occurring Odd Number of TimesGiven an array arr[] consisting of positive integers that occur even number of times, except one number, which occurs odd number of times. The task is to find this odd num... Read More
HashC ProgramsC++ ProgramsDSAArraysBitwise-XOR
Number occurring odd number of timesGiven an array arr[] of positive integers. All numbers occur an even number of times except one number which occurs an odd number of times. Examples :Input : arr[]= [1, 2,... Read More
Bit MagicHashDSAArraysAmazonSnapdealBitwise-XOR
Print reverse of a string using recursionGiven a string, the task is to print the given string in reverse order using recursion.Examples:Input: s = "Geeks for Geeks"Output: "skeeG rof skeeG"Explanation: After rev... Read More
StringsRecursionDSA
Position of rightmost set bitGiven an integer n, Return the position of the first set bit from right to left in the binary representation n. If no set bits present , then return 0.Note: Position of ri... Read More
Bit MagicDSAAmazon
PHP Program to find whether a no is power of twoGiven a positive integer, write a function to find if it is a power of two or not.Examples :Input : n = 4Output : Yes22 = 4Input : n = 7Output : NoInput : n = 32Output : Y... Read More
Web TechnologiesPHPPHP Programs
C# Program to find whether a no is power of twoGiven a positive integer, write a function to find if it is a power of two or not.Examples :Input : n = 4Output : Yes22 = 4Input : n = 7Output : NoInput : n = 32Output : Y... Read More
C#
Java Program to find whether a no is power of twoGiven a positive integer, write a function to find if it is a power of two or not.Examples :Input : n = 4Output : Yes22 = 4Input : n = 7Output : NoInput : n = 32Output : Y... Read More
Java
C++ Program to find whether a no is power of twoGiven a positive integer, write a function to find if it is a power of two or not.Examples :Input : n = 4Output : Yes22 = 4Input : n = 7Output : NoInput : n = 32Output : Y... Read More
C++
C Program to find whether a no is power of twoGiven a positive integer, write a function to find if it is a power of two or not.Examples :Input : n = 4Output : Yes22 = 4Input : n = 7Output : NoInput : n = 32Output : Y... Read More
C Language
Check for Power of 2Given a positive integer n, check whether it is a power of 2 or not.Examples: Input : n = 16Output : trueExplanation: 24 = 16 Input : n = 42Output : falseExplanation: 42... Read More
Bit MagicMathematicalDSAQualcommSamsungSAP LabsFactSet
Efficient way to multiply with 7Given a number n, find the result after multiplying it by 7.Example:Input: n=8Output: 56Naive Approach: The basic way to solve this is to use a multiplication operator, ad... Read More
Bit MagicMathematicalDSA
Reverse Digits of a NumberGiven an Integer n, find the reverse of its digits.Examples:  Input: n = 122Output: 221Explanation: By reversing the digits of number, number will change into 221.Input: n... Read More
MathematicalRecursionDSAMAQ SoftwareMakeMyTripnumber-digitsModular Arithmetic
Program to find parityParity: Parity of a number refers to whether it contains an odd or even number of 1-bits. The number has "odd parity" if it contains an odd number of 1-bits and is "even p... Read More
Bit MagicMathematicalDSAcryptography
Write an Efficient Method to Check if a Number is Multiple of 3Given an integer n, the task is to determine whether n is a multiple of 3 or not.Examples:Input: n = 9Output: YesExplanation: 9 is divisible by 3, so it is a multiple of 3... Read More
Bit MagicMathematicalDSAMicrosoftAmazon
Majority ElementGiven an array arr[] of size n, find the element that appears more than ⌊n/2⌋ times. If no such element exists, return -1.Examples:Input: arr[] = [1, 1, 2, 1, 3, 5, 1]Outp... Read More
DSAArraysMajority ElementMoore's Voting AlgorithmMicrosoftAmazonSamsungD-E-ShawAccoliteMakeMyTripFactSet
1

...

12154121551215612157
GeeksforGeeks
location
Corporate & Communications Address:
A-143, 6th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
location
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play StoreGFG App on App Store
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • Careers
  • Contact Us
  • Corporate Solution
  • Campus Training Program
  • Explore
  • POTD
  • Practice Problems
  • Blogs
  • Upskill Courses
  • Connect
  • Tutorials
  • Programming Languages
  • DSA
  • Web Technology
  • AI, ML & Data Science
  • DevOps
  • CS Core Subjects
  • GATE
  • School Subjects
  • Software and Tools
  • Courses
  • ML and Data Science
  • DSA and Placements
  • Web Development
  • Data Science
  • Programming Languages
  • DevOps & Cloud
  • GATE
  • MongoDB Certifications
  • Preparation Corner
  • Interview Corner
  • Aptitude
  • Puzzles
  • GfG 160
  • System Design
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved