#170

Sdílet
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++

Komentáře • 9

  • @ganeshjaggineni4097
    @ganeshjaggineni4097 Před měsícem

    NICE SUPER EXCELLENT MOTIVATED

  • @manikanth.8507
    @manikanth.8507 Před měsícem

    Wow,You have explain very clearly and approach was also nice

  • @aeroabrar_31
    @aeroabrar_31 Před měsícem

    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

  • @gouthamkumar1909
    @gouthamkumar1909 Před měsícem +1

    what about sorting bro is it TC:0(n)+log(n) ??

    • @maskedcoder-dy1ub
      @maskedcoder-dy1ub  Před měsícem +4

      maximum elements in list is q as queires are adding elements in the list
      so TC:-> O(q) + O(qlogq)
      hope it helps

  • @mayankshakya9200
    @mayankshakya9200 Před měsícem

    class Solution {
    public:
    vector constructList(int n, vector &arr) {
    // code here
    arr.insert(arr.begin(),{0,0});
    n=arr.size();
    cout