can u solve this question? with bit manipulation in constant extra space and linear time complexity
▎Title: 137. Single Number II
Difficulty: Medium
Denoscription:
Given an integer array
You must implement a solution with a linear runtime complexity and use only constant extra space.
Example 1:
Input:
Output:
Example 2:
Input:
Output:
Constraints:
•
•
• Each element in
▎Title: 137. Single Number II
Difficulty: Medium
Denoscription:
Given an integer array
nums where every element appears three times except for one, which appears exactly once, find the single element and return it.You must implement a solution with a linear runtime complexity and use only constant extra space.
Example 1:
Input:
nums = [2,2,3,2] Output:
3Example 2:
Input:
nums = [0,1,0,1,0,1,99] Output:
99Constraints:
•
1 <= nums.length <= 3 * 10^4•
-2^31 <= nums[i] <= 2^31 - 1• Each element in
nums appears exactly three times except for one element which appears once.❤3
🚨 16 Billion Logins Leaked in Historic Data Breach
Cybersecurity researchers have uncovered one of the largest breaches ever. Over 16 billion login credentials—including social media, corporate, VPN, and email accounts—have been leaked online. The data is recent and weaponizable, gathered through malware from unsecured databases. It includes:
* Usernames, passwords, and URLs
* Apple accounts, Telegram-linked accounts, and more
* Datasets originating from the Russian Federation
Experts warn this leak is a blueprint for mass exploitation, enabling identity theft, phishing, and account takeovers.
Check if your email was exposed:
Using this link
Protect yourself now:
* Enable Two‑Factor Authentication (2FA)
* Use a password manager
* Rotate your passwords regularly
Stay safe.
Cybersecurity researchers have uncovered one of the largest breaches ever. Over 16 billion login credentials—including social media, corporate, VPN, and email accounts—have been leaked online. The data is recent and weaponizable, gathered through malware from unsecured databases. It includes:
* Usernames, passwords, and URLs
* Apple accounts, Telegram-linked accounts, and more
* Datasets originating from the Russian Federation
Experts warn this leak is a blueprint for mass exploitation, enabling identity theft, phishing, and account takeovers.
Check if your email was exposed:
Using this link
Protect yourself now:
* Enable Two‑Factor Authentication (2FA)
* Use a password manager
* Rotate your passwords regularly
Stay safe.
✍3💋1
If you're procrastinating and if being focus is hard for u ,read this great book
📢 Official Call for Teams: ETCPC 2025 Registration Now Open! 🎓💻
The 10th Ethiopian Collegiate Programming Contest (ETCPC 2025) is officially accepting team registrations. This is your opportunity to represent Addis Ababa University in Ethiopia's most prestigious coding competition.
Competition Details:
📅 Date: August 3–4, 2025
⏳ Registration Deadline: Sunday, Midnight 12:00 AM
👥 Team Composition: 3 students per team
RSVP HERE: Register now and secure your spot.
📍 Important Notes:
✔️ Only fully registered teams will be accepted
✔️ Official rules & details will be emailed after signup
✔️ All members must be eligible AAU students
⚡3👍1
If you applied for the INSA summer camp, please check their Telegram account for the names of students who were accepted in the first phase. https://news.1rj.ru/str/cteinsa
❤5
🧠 INSA Summer Camp Past Questions — Test Your Logic!
1️⃣ Family Logic
Given:
+ = husband
/ = sister
× = son
- = wife
What does W × Y / Z mean?
A) Son of Z's brother
B) Son of Z's sister
C) Daughter of Z's sister
D) Daughter of Z's sister
2️⃣ Code Puzzle
A girl student sleeps → Vtp htj 1
A priest teaches tonight → Vxp wyz 2
A queen speaks tonight → Tsp wyz 1
"A lady speaks tonight"?
A) Vtp Tsp
B) Tsp Wyz
C) Wyz 2 htj
D) Tsp Wyz 1
3️⃣ Word Match
Imaginative Dynamic Learning = Sue Deb Can
Complex Dynamic System = Sue Rob Be
Complex Revolutionary Thinking = Mol De Be
What is Sue Be?
A) Revolutionary System
B) Dynamic System
C) Complex Dynamic
D) Imaginative Learning
👇👇👇
Answers:
1️⃣ B
2️⃣ D
3️⃣ C
🔥 Comment your score! More coming soon.
1️⃣ Family Logic
Given:
+ = husband
/ = sister
× = son
- = wife
What does W × Y / Z mean?
A) Son of Z's brother
B) Son of Z's sister
C) Daughter of Z's sister
D) Daughter of Z's sister
2️⃣ Code Puzzle
A girl student sleeps → Vtp htj 1
A priest teaches tonight → Vxp wyz 2
A queen speaks tonight → Tsp wyz 1
"A lady speaks tonight"?
A) Vtp Tsp
B) Tsp Wyz
C) Wyz 2 htj
D) Tsp Wyz 1
3️⃣ Word Match
Imaginative Dynamic Learning = Sue Deb Can
Complex Dynamic System = Sue Rob Be
Complex Revolutionary Thinking = Mol De Be
What is Sue Be?
A) Revolutionary System
B) Dynamic System
C) Complex Dynamic
D) Imaginative Learning
👇👇👇
Answers:
1️⃣ B
2️⃣ D
3️⃣ C
🔥 Comment your score! More coming soon.
👍7🤔3❤1
Guys, have you heard of the BIT (Binary Indexed Tree)?
I learned about it a few days ago — it transforms both prefix‐sum queries and point updates from O(n) down to O(log n)!
In problems with frequent range‐sum queries and multiple updates, a simple prefix‐sum array fails (you’ll hit TLE). BIT handles every query and update in O(log n) time, so even with many operations your total cost stays around O(n log n) instead of O(n²).
Give it a try next time you see “range‑sum with updates”!
s
if u want to know more about it give me thumbs up i will share some questions that can be solved with with this algo with a video explanation about the topic
I learned about it a few days ago — it transforms both prefix‐sum queries and point updates from O(n) down to O(log n)!
In problems with frequent range‐sum queries and multiple updates, a simple prefix‐sum array fails (you’ll hit TLE). BIT handles every query and update in O(log n) time, so even with many operations your total cost stays around O(n log n) instead of O(n²).
Give it a try next time you see “range‑sum with updates”!
s
if u want to know more about it give me thumbs up i will share some questions that can be solved with with this algo with a video explanation about the topic
👍7🔥2🆒1
Leetcode with dani
Guys, have you heard of the BIT (Binary Indexed Tree)? I learned about it a few days ago — it transforms both prefix‐sum queries and point updates from O(n) down to O(log n)! In problems with frequent range‐sum queries and multiple updates, a simple prefix‐sum…
this is typical BIT quesiton start with this, i will add more
Range Sum
Range Sum
LeetCode
Range Sum Query - Mutable - LeetCode
Can you solve this real interview question? Range Sum Query - Mutable - Given an integer array nums, handle multiple queries of the following types:
1. Update the value of an element in nums.
2. Calculate the sum of the elements of nums between indices…
1. Update the value of an element in nums.
2. Calculate the sum of the elements of nums between indices…
👍4🤝2