#170
Vložit
- čas přidán 31. 05. 2024
- 🚀 Solving Geeks for Geeks Problem of the Day(POTD) in C++ | Construct list using given q XOR queries | Intuition Explained🧠
Problem Statement : www.geeksforgeeks.org/problem...
Solution Code : github.com/Masked-coder11/gfg...
🌐 Connect with Me:
GitHub: github.com/Masked-coder11
Instagram: garg.yugayu...
Linkedin: www.linkedin.com/in/yugayu-garg-47a001225
💬 Have questions or suggestions? Drop them in the comments below! Let's learn and grow together. Happy coding! 👨💻
#GFG #POTD #geeksforgeeks #problemoftheday #c++
NICE SUPER EXCELLENT MOTIVATED
Thanks a lot
Wow,You have explain very clearly and approach was also nice
Glad it helped
00:05 Construct list using XOR queries
01:18 Construct a list using XOR queries
02:26 Using XOR queries to construct a list efficiently
03:39 Exploring the Brute Force version and Z operations on a list.
04:53 Detailed explanation on how to construct a list using XOR queries
06:01 Construct the list using XOR queries.
07:10 The algorithm involves sorting the list and returning it, leading to O(N) time complexity
08:16 Construct a list using XOR queries
what about sorting bro is it TC:0(n)+log(n) ??
maximum elements in list is q as queires are adding elements in the list
so TC:-> O(q) + O(qlogq)
hope it helps
class Solution {
public:
vector constructList(int n, vector &arr) {
// code here
arr.insert(arr.begin(),{0,0});
n=arr.size();
cout
Isme prob kya hai sir can you correst it?