Find the two non-repeating elements in an array of repeating elements | Bit Manipulation | DSA Sheet
Vložit
- čas přidán 23. 07. 2024
- #bit #bitmanipulation #bitmasking #competitiveprogramming #coding #dsa
Hey, Guys in this video I have explained how we can solve the problem 'Find the two non-repeating elements in an array of repeating elements'.
--------------------------------------------------------------------------------
Unacademy Links--
Use my code "YOGESH" to access all FREE classes and get a 10% Discount on Paid Courses.
Career as a Developer: unacademy.com/goal/career-as-...
Approaching CodeChef: bit.ly/Unacademy-Yogesh-Softw...
--------------------------------------------------------------------------------
Join our Telegram Channel for more Information
🔰 Telegram Channel Link = t.me/CodeLibrary1
🔰 Telegram Discussion Group Link = t.me/CodeLibraryDiscussion
Subscribe Our 2nd Channel = / @codeupwithtwins6728
🔰 Array Playlist = • Love Babbar DSA 450 Qu...
🔰 String Playlist = • Love Babbar DSA 450 Qu...
🔰 Searching and Sorting Playlist = • Love Babbar DSA 450 Qu...
🔰 Binary Tree Playlist = • Love Babbar DSA 450 Qu...
🔰 Linked List Playlist = • Love Babbar DSA 450 Qu...
🔰 Graph Playlist = • Love Babbar DSA 450 Qu...
🔰 Dynamic Programming Playlist = • Love Babbar DSA 450 Qu...
🔰 Informative Videos = • Informative Videos
🔰 Love Babbar DSA Sheet: drive.google.com/file/d/1FMdN...
Follow us on Instagram:
🔰 Shailesh Yogendra : / shaileshyogendra
🔰 Yogesh Yogendra : / i_am_yogesh_here
Follow us on LinkedIn:
🔰 Yogesh Yogendra : / yogesh-yogendra-26bbb518a
🔰 Shailesh Yogendra : / shailesh-yogendra-8b13...
Hope you like it. Comment if you have any doubt
LIKE | SHARE | SUBSCRIBE
Time Stamps
0:00 Intro + Example
2:16 promo
3:46 Explanation + Code
bhai maza aagya thankyou... i recently started DSA sheet this videos is helpfull keep it up
Really a great teacher ......keep it up
Crystal clear explaination, thank you so much.
Bhai kuch kuch numbers pe ye sahi nhi run ho raha
what if both the elements are even ?
or both the elements are odd ?
then how do we split ?
right most bit...but the formula XOR & ~(XOR-1) will come automatically
thanks, bros.
what if both non repeating numbers are even example: 1,1,2,3,3,4,5,5 will this code run for it?
class Solution {
public int[] singleNumber(int[] nums) {
int res = 0,setBit=1;
int[] result = new int[2];
for(int i=0;i
very nice explaination
great explanation
at line 30you sort the elenment ? doesn't it takes TC nlogn?
thanks!
bhai apka explanation toh kamal hai
awesome voice +explaination
i know java i have one doubt that while using Vector ans will our space complexity be O(n) ? in solution we want O(1) ? Correct me if i am wrong!
same doubt 😑
We don't consider the answer vector when calculating space complexity.
can anyone plz share the code for sorting approach
Nice explanation
can anyone please explain what is happening in line 17 and and how we get the formula xor & ~(xor-1) ?
a&(~(a-1)) gives "1" where the right most bit is "1" and "0" in other places
@@senkaku7705 thnxs🙂
bhaiya rightmost bit xor&1 karke bhi toh nikali jaa shakti thi what is the catch in this
5:54
Sort
Hash map
Bits
Bro, zoho ke level 2 Hai Mera 27 ko, zoho vale konse topics pr focus karte Hai?
level 2 focus more on array,strings,hashing and matrix
sir aapne odd number aur even number ko alg kar dene ko agar non repeating element dono odd ya even ho to usko thori na find out kar skate hain.
class Solution {
public int[] singleNumber(int[] nums) {
int res = 0,setBit=1;
int[] result = new int[2];
for(int i=0;i
excellent explanation , :)
Bro heap ka bhi bna do
ya will make
Bhaiya please graph ke upload karo
graph ke toh bahut sare upload kiye hue hai....have a look in playlist
@@CodeLibrary nhi bhai uske aage ki baat kr rha hu
will do that don't worry
@@CodeLibrary bhaiya ye batao apne experience se kya ye sheet sirf solve kr lene ke baad yahi question repeat hoga interview me
jaruri nhi hai new questions bhi aa sakte hai but agar tum ye sheet solve kar lete ho toh tumhe new questions karne ka confidence aa jaega
vahyaad explaination
Bro please provide the code in python too.
abhi bhi short hi bol rahe ho bhai, short == sort