• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests
January 05, 2024 |1.2K Views
PROBLEM OF THE DAY : 04/01/2024 | Find element occuring once when all other are present thrice
Description
Discussion

Welcome to the daily solving of our PROBLEM OF THE DAY with Yash Dwivedi. We will discuss the entire problem step-by-step and work towards developing an optimized solution. This will not only help you brush up on your concepts of Bit Magic but also build up problem-solving skills.

In this problem, we are given an array of integers arr[] of length N, every element appears thrice except for one which occurs once.
Find that element that occurs once.

Example :

Input: N = 4 arr[] = {1, 10, 1, 1}
Output: 10

Explanation: 10 occurs once in the array while the other element 1 occurs thrice.

Give the problem a try before going through the video. All the best!!!
Problem Link: https://www.geeksforgeeks.org/problems/find-element-occuring-once-when-all-other-are-present-thrice/1