codi
codi
  • 119
  • 58 454
Good Substrings || GFG Weekly Contest - 169 || GFG Solution
Good Substrings || GFG Weekly Contest - 169 || GFG Solution
GFG contest solutions today, GFG contest solutions live, GFG solutions, GFG contest 169,GFG Weekly - 169 [Rated Contest], coding, programming, competitive programming, coding tutorials, GFG, GFG editorials , gfg solution
Переглядів: 355

Відео

Minimize Cost || GFG Weekly Contest - 169 || GFG Solution
Переглядів 3414 години тому
Minimize Cost || GFG Weekly Contest - 169 || GFG Solution GFG contest solutions today, GFG contest solutions live, GFG solutions, GFG contest 169,GFG Weekly - 169 [Rated Contest], coding, programming, competitive programming, coding tutorials, GFG, GFG editorials , gfg solution
Count Almost Equal Pairs I || LeetCode Weekly Contest 412 || Leetcode Solution
Переглядів 9134 години тому
Count Almost Equal Pairs I || LeetCode Weekly Contest 412 || Leetcode Solution leetcode weekly contest solutions today, leetcode contest solutions live, leetcode solutions, leetcode contest 412, leetcode weekly contest 412, coding, programming, competitive programming, coding tutorials, leetcode, leetcode editorials
Final Array State After K Multiplication Operations I || LeetCode Weekly Contest 412 || Leetcode Sol
Переглядів 9904 години тому
Final Array State After K Multiplication Operations I || LeetCode Weekly Contest 412 || Leetcode Solution leetcode weekly contest solutions today, leetcode contest solutions live, leetcode solutions, leetcode contest 412, leetcode weekly contest 412, coding, programming, competitive programming, coding tutorials, leetcode, leetcode editorials
Left View of Binary Tree || GFG POTD || August 23/2024
Переглядів 209 годин тому
Left View of Binary Tree || GFG POTD || August 23/2024, gfg , geeksforgeeks , gfg potd , gfg today potd , coding problem , today potd problem solution , gfg problem of the day , gfg potd today solution , gfg potd c , gfg potd java , gfg potd in python
Double Trouble (💢Partially Correct Answer) || CodeChef Starters 148 || CodeChef Solution
Переглядів 1,3 тис.14 годин тому
Double Trouble (*Partially Correct Answer) || CodeChef Starters 148 || CodeChef Solution codechef contest solutions today, codechef contest solutions live, codechef solutions, codechef contest 148,codechef Starters 148, coding, programming, competitive programming, coding tutorials, codechef, codechef editorials, The Undisappearance, FightBots, Let Me Eat Cake!
FightBots || CodeChef Starters 148 || CodeChef Solution
Переглядів 1,9 тис.14 годин тому
FightBots || CodeChef Starters 148 || CodeChef Solution codechef contest solutions today, codechef contest solutions live, codechef solutions, codechef contest 148,codechef Starters 148, coding, programming, competitive programming, coding tutorials, codechef, codechef editorials, Let Me Eat Cake!, The Undisappearance, Double Trouble
Let Me Eat Cake! || CodeChef Starters 148 || CodeChef Solution
Переглядів 1,3 тис.14 годин тому
Let Me Eat Cake! || CodeChef Starters 148 || CodeChef Solution codechef contest solutions today, codechef contest solutions live, codechef solutions, codechef contest 148,codechef Starters 148, coding, programming, competitive programming, coding tutorials, codechef, codechef editorials, The Undisappearance, FightBots, Double Trouble
Minimum Remaining Boys - I || GFG Weekly Contest - 168 || GFG Solution
Переглядів 22621 годину тому
Minimum Remaining Boys - I || GFG Weekly Contest - 168 || GFG Solution GFG contest solutions today, GFG contest solutions live, GFG solutions, GFG contest 168,GFG Weekly - 168 [Rated Contest], coding, programming, competitive programming, coding tutorials, GFG, GFG editorials , gfg solution, Maximum Value, Geekland Tax Calculator
Maximum Value || GFG Weekly Contest - 168 || GFG Solution
Переглядів 20121 годину тому
Maximum Value || GFG Weekly Contest - 168 || GFG Solution GFG contest solutions today, GFG contest solutions live, GFG solutions, GFG contest 168,GFG Weekly - 168 [Rated Contest], coding, programming, competitive programming, coding tutorials, GFG, GFG editorials , gfg solution, Geekland Tax Calculator
Geekland Tax Calculator || GFG Weekly Contest - 168 || GFG Solution
Переглядів 15421 годину тому
Geekland Tax Calculator || GFG Weekly Contest - 168 || GFG Solution GFG contest solutions today, GFG contest solutions live, GFG solutions, GFG contest 168,GFG Weekly - 168 [Rated Contest], coding, programming, competitive programming, coding tutorials, GFG, GFG editorials , gfg solution
Maximum Energy Boost From Two Drinks || LeetCode Weekly Contest 411 || Leetcode Solution
Переглядів 94621 годину тому
Maximum Energy Boost From Two Drinks || LeetCode Weekly Contest 411 || Leetcode Solution leetcode weekly contest solutions today, leetcode contest solutions live, leetcode solutions, leetcode contest 411, leetcode weekly contest 411, coding, programming, competitive programming, coding tutorials, leetcode, leetcode editorials
Count Substrings That Satisfy K-Constraint I || LeetCode Weekly Contest 411 || Leetcode Solution
Переглядів 81021 годину тому
Count Substrings That Satisfy K-Constraint I || LeetCode Weekly Contest 411 || Leetcode Solution leetcode weekly contest solutions today, leetcode contest solutions live, leetcode solutions, leetcode contest 411, leetcode weekly contest 411, coding, programming, competitive programming, coding tutorials, leetcode, leetcode editorials
Find the Power of K-Size Subarrays II || LeetCode Biweekly Contest 137 || Leetcode Solution
Переглядів 896День тому
Find the Power of K-Size Subarrays II || LeetCode Biweekly Contest 137 || Leetcode Solution, leetcode Biweekly contest solutions today, leetcode contest solutions live, leetcode solutions, leetcode contest 137, leetcode Biweekly Contest 137, coding, programming, competitive programming, coding tutorials, leetcode, leetcode editorials , biweekly contest 137, leetcode contest 137
Find the Power of K-Size Subarrays I || LeetCode Biweekly Contest 137 || Leetcode Solution
Переглядів 65День тому
Find the Power of K-Size Subarrays I || LeetCode Biweekly Contest 137 || Leetcode Solution, leetcode Biweekly contest solutions today, leetcode contest solutions live, leetcode solutions, leetcode contest 137, leetcode Biweekly Contest 137, coding, programming, competitive programming, coding tutorials, leetcode, leetcode editorials , biweekly contest 137, leetcode contest 137
Non-Primes 101 || CodeChef Starters 147 || CodeChef Solution
Переглядів 1,7 тис.День тому
Non-Primes 101 || CodeChef Starters 147 || CodeChef Solution
Truth Teller And Liars 101 || CodeChef Starters 147 || CodeChef Solution
Переглядів 941День тому
Truth Teller And Liars 101 || CodeChef Starters 147 || CodeChef Solution
Independence Day 101 || CodeChef Starters 147 || CodeChef Solution
Переглядів 1,2 тис.День тому
Independence Day 101 || CodeChef Starters 147 || CodeChef Solution
Counting Game || GFG Weekly Contest - 167 || GFG Solution
Переглядів 20814 днів тому
Counting Game || GFG Weekly Contest - 167 || GFG Solution
Maximizing Productivity || GFG Weekly Contest - 167 || GFG Solution
Переглядів 22614 днів тому
Maximizing Productivity || GFG Weekly Contest - 167 || GFG Solution
Bit Maximization || GFG Weekly Contest - 167 || GFG Solution
Переглядів 27914 днів тому
Bit Maximization || GFG Weekly Contest - 167 || GFG Solution
Find the Count of Monotonic Pairs I || LeetCode Weekly Contest 408 || Leetcode Solution
Переглядів 60114 днів тому
Find the Count of Monotonic Pairs I || LeetCode Weekly Contest 408 || Leetcode Solution
Count the Number of Good Nodes || LeetCode Weekly Contest 410 || Leetcode Solution
Переглядів 1,1 тис.14 днів тому
Count the Number of Good Nodes || LeetCode Weekly Contest 410 || Leetcode Solution
Snake in Matrix || LeetCode Weekly Contest 410 || Leetcode Solution
Переглядів 55514 днів тому
Snake in Matrix || LeetCode Weekly Contest 410 || Leetcode Solution
Maximize Array Value After Rearrangement || GFG POTD || August 9/2024
Переглядів 19314 днів тому
Maximize Array Value After Rearrangement || GFG POTD || August 9/2024
Bouncing Ball || CodeChef Starters 146 || CodeChef Solution
Переглядів 1,4 тис.14 днів тому
Bouncing Ball || CodeChef Starters 146 || CodeChef Solution
Permutation Construction || CodeChef Starters 146 || CodeChef Solution
Переглядів 1,4 тис.14 днів тому
Permutation Construction || CodeChef Starters 146 || CodeChef Solution
Knockout tournament || CodeChef Starters 146 || CodeChef Solution
Переглядів 2,3 тис.14 днів тому
Knockout tournament || CodeChef Starters 146 || CodeChef Solution
No Winner || CodeChef Starters 146 || CodeChef Solution
Переглядів 2,2 тис.14 днів тому
No Winner || CodeChef Starters 146 || CodeChef Solution
Varient Operations || GFG Weekly - 166 || GFG Solution
Переглядів 16421 день тому
Varient Operations || GFG Weekly - 166 || GFG Solution

КОМЕНТАРІ

  • @SgrhGehns
    @SgrhGehns День тому

    Thompson Dorothy Harris Edward Wilson Susan

  • @letsvlogwithbarsha
    @letsvlogwithbarsha 2 дні тому

    anyone please share 3 or 4

  • @thanosgamingg1572
    @thanosgamingg1572 2 дні тому

    Remaining 2 questions plzz

  • @Shorts-mc7ft
    @Shorts-mc7ft 2 дні тому

    long long cntGood(string s) { // code here long long a = 0; int z = 0; for (int i = 0; i < s.size(); i++) { int v = s[i] - '0'; if (v % 2 != 0) { a += i + 1; a -= z; } if (v == 0) z++; } return a; }

  • @Shorts-mc7ft
    @Shorts-mc7ft 2 дні тому

    long long minCost(int n, vector<int> &a, vector<int> &b) { // code here map<int, int> count; vector<int> swap_a, swap_b; for (int i = 0; i < n; i++) { count[a[i]]++; count[b[i]]--; } for (auto it: count) { if (it.second % 2 != 0) return -1; } for (int i=0; i < n; i++) { if (count[a[i]] > 0) { swap_a.push_back(a[i]); count[a[i]] -= 2; } if (count[b[i]] < 0) { swap_b.push_back(b[i]); count[b[i]] += 2; } } sort(swap_a.begin(), swap_a.end()); sort(swap_b.rbegin(), swap_b.rend()); long long cost = 0; int m = swap_a.size(); for (int i = 0; i < m; i++) { cost += min(swap_a[i], swap_b[i]); } return cost; }

  • @mr.manager9025
    @mr.manager9025 2 дні тому

    Give the code in comment

    • @letsvlogwithbarsha
      @letsvlogwithbarsha 2 дні тому

      class Solution { public: long long minCost(int n, vector<int> &a, vector<int> &b) { map<int, int> count; vector<int> swap_a, swap_b; // Count frequency differences between arrays a and b for (int i = 0; i < n; i++) { count[a[i]]++; count[b[i]]--; } // Check if it's possible to make arrays equal for (auto it : count) { if (it.second % 2 != 0) return -1; } // Collect elements to be swapped for (int i = 0; i < n; i++) { if (count[a[i]] > 0) { swap_a.push_back(a[i]); count[a[i]] -= 2; } if (count[b[i]] < 0) { swap_b.push_back(b[i]); count[b[i]] += 2; } } // Sort swap_a in ascending order and swap_b in descending order sort(swap_a.begin(), swap_a.end()); sort(swap_b.rbegin(), swap_b.rend()); long long cost = 0; int m = swap_a.size(); // Calculate the minimum cost of swapping for (int i = 0; i < m; i++) { cost += min(swap_a[i], swap_b[i]); } return cost; } };

  • @AnujKumar-r8m2q
    @AnujKumar-r8m2q 2 дні тому

    other??

  • @Vivekshorts79
    @Vivekshorts79 2 дні тому

    Bhai 2nd bhejo

  • @technicalmaster8797
    @technicalmaster8797 6 днів тому

    something is wrong, its not working can anyone help

  • @AryanGupta-zo4sk
    @AryanGupta-zo4sk 6 днів тому

    Bhai python solutions kha milenge ? Anyone knows?

  • @AryanGupta-zo4sk
    @AryanGupta-zo4sk 6 днів тому

    Bhai python solutions kha milenge ? Anyone knows?

  • @AryanGupta-zo4sk
    @AryanGupta-zo4sk 6 днів тому

    Bhai kisi ko pata h python solutions kha milenge ???

  • @rahulroxspirit8704
    @rahulroxspirit8704 6 днів тому

    is there python solution for this?

  • @c_b_eswar_07
    @c_b_eswar_07 6 днів тому

    3rd question solution please

  • @user-cn1zg2wt4w
    @user-cn1zg2wt4w 6 днів тому

    answers in comment bro plz its not visible

  • @cod-q1h
    @cod-q1h 9 днів тому

    4th answer is also same as 3rd answer

  • @veilainsaan3670
    @veilainsaan3670 9 днів тому

    Bhai 2nd ya 3rd ya 4th ka answer bhi daal do

  • @Insidious25
    @Insidious25 9 днів тому

    code bhej do comment pe

  • @absolvegaming570m4
    @absolvegaming570m4 9 днів тому

    Bhai 3rd ka bhej

  • @user-xo4hq8bw6q
    @user-xo4hq8bw6q 10 днів тому

    share the code in c++

  • @cod-q1h
    @cod-q1h 13 днів тому

    Key Idea of the Problem: - You are given two paths. One leads to eternal happiness, and the other leads to certain doom. - Out of ( N + M ) people, ( N ) people are guaranteed to always tell the truth, and the other ( M ) people may or may not tell the truth (i.e., they can lie). - You need to ensure you can find the correct path by asking ( X ) people (and you don't know in advance who are the truth-tellers or liars). Approach: 1. If ( N <= M ): - If the number of truth-tellers ( N ) is less than or equal to the number of people who may lie ( M ), it's impossible to guarantee the correct path. - This is because the liars may outnumber or equal the truth-tellers, and no matter who you ask, you can't reliably distinguish the truth from the lies. In this case, the output should be `-1`. 2. If ( N > M ): - If the number of truth-tellers ( N ) is greater than the number of potential liars ( M ), it is possible to determine the correct path by asking enough people. - To guarantee finding the correct path, you need to ask enough people such that even if the maximum number of liars ( M ) give false answers, the majority of responses will still indicate the correct path. - The minimum number of people ( X ) you need to ask is ( 2M + 1 ). This is because even if all ( M ) liars lie and disagree with each other, there will still be a majority who are truth-tellers giving consistent answers.

  • @vivekmachade9868
    @vivekmachade9868 13 днів тому

    code

  • @PawanKumar-lc3hl
    @PawanKumar-lc3hl 13 днів тому

    code

  • @Lalithavasavi
    @Lalithavasavi 13 днів тому

    Can you please explain the logic sir ?

    • @cod-q1h
      @cod-q1h 13 днів тому

      Key Idea of the Problem: - You are given two paths. One leads to eternal happiness, and the other leads to certain doom. - Out of ( N + M ) people, ( N ) people are guaranteed to always tell the truth, and the other ( M ) people may or may not tell the truth (i.e., they can lie). - You need to ensure you can find the correct path by asking ( X ) people (and you don't know in advance who are the truth-tellers or liars). Approach: 1. If ( N <= M ): - If the number of truth-tellers ( N ) is less than or equal to the number of people who may lie ( M ), it's impossible to guarantee the correct path. - This is because the liars may outnumber or equal the truth-tellers, and no matter who you ask, you can't reliably distinguish the truth from the lies. In this case, the output should be `-1`. 2. If ( N > M ): - If the number of truth-tellers ( N ) is greater than the number of potential liars ( M ), it is possible to determine the correct path by asking enough people. - To guarantee finding the correct path, you need to ask enough people such that even if the maximum number of liars ( M ) give false answers, the majority of responses will still indicate the correct path. - The minimum number of people ( X ) you need to ask is ( 2M + 1 ). This is because even if all ( M ) liars lie and disagree with each other, there will still be a majority who are truth-tellers giving consistent answers.

  • @tusharkumar1964
    @tusharkumar1964 13 днів тому

    Thanks ❤❤❤ bhaiya

  • @LeetcodeSolutions-sn1eh
    @LeetcodeSolutions-sn1eh 13 днів тому

    //author: cp_god //date: 14th august 2024 #include<bits/stdc++.h> #define int long long using namespace std; int32_t main(){ int t; cin>>t; while(t--){ int n,m; cin>>n>>m; if(m>=n) cout<<-1<<endl; else{ cout<<m*2+1<<endl; } } } truth tellers code

  • @Souravjoshicreativeunk6348
    @Souravjoshicreativeunk6348 16 днів тому

    This showing runtime

  • @Multilevellonde
    @Multilevellonde 16 днів тому

    Bro please give the source code

  • @Multilevellonde
    @Multilevellonde 16 днів тому

    Sourcecode please

  • @Souravjoshicreativeunk6348
    @Souravjoshicreativeunk6348 16 днів тому

    Send code

  • @vivekmachade9868
    @vivekmachade9868 16 днів тому

    4th wala bej do

  • @Souravjoshicreativeunk6348
    @Souravjoshicreativeunk6348 16 днів тому

    Send code

  • @pranithreddy
    @pranithreddy 16 днів тому

    bhai improve kaise kare ek bhi question nahi hua mera

  • @avi7474
    @avi7474 16 днів тому

    can you make a video explaining the solution? ngl this was a pretty goog dp solution

  • @bhaveshsonar7558
    @bhaveshsonar7558 16 днів тому

    Good, but I am not able to solve any of these

    • @cod-q1h
      @cod-q1h 16 днів тому

      it is completely depends upon your practice. Today you do not solve any problem but you practice it with consistancy, one day you will solve any type of problem 💚

  • @gunashekhargunupuru4990
    @gunashekhargunupuru4990 16 днів тому

    How the other country guysbare doing da they just finished everything in just 25 minutes

  • @wittyboy__27
    @wittyboy__27 16 днів тому

    3rd Any Idea Bruh?

    • @cod-q1h
      @cod-q1h 16 днів тому

      Check the channel page

  • @abhijeetsarkar7541
    @abhijeetsarkar7541 18 днів тому

    the background music is irritating

  • @scienceandtechnology6670
    @scienceandtechnology6670 20 днів тому

    aree bahi eska solution dedo

  • @omhpatil
    @omhpatil 20 днів тому

    Bro please send code in cmt because my code is working correct but showing time limit exceed please share ur code if u can in cmt section

  • @mohamedanas8493
    @mohamedanas8493 20 днів тому

    #include <bits/stdc++.h> using namespace std; int main() { int foo; cin >> foo; vector<int> bar; for (int _ = 0; _ < foo; ++_) { int baz; cin >> baz; vector<int> qux(baz); for (int i = 0; i < baz; ++i) { cin >> qux[i]; } vector<int> quux(baz, 0); vector<int> corge(baz, 0); quux[0] = qux[0]; for (int grault = 1; grault < baz; ++grault) { quux[grault] = quux[grault - 1] + qux[grault]; } corge[baz - 1] = qux[baz - 1]; for (int grault = baz - 2; grault >= 0; --grault) { corge[grault] = corge[grault + 1] + qux[grault]; } int waldo = 0; for (int fred = 0; fred < baz; ++fred) { if (qux[fred] == 0) { if (corge[fred] == quux[fred]) { waldo += 2; } else if (abs(corge[fred] - quux[fred]) == 1) { waldo += 1; } } } bar.push_back(waldo); } for (const int& plugh : bar) { cout << plugh << endl; } return 0; }

  • @amanpathanvlogs5143
    @amanpathanvlogs5143 20 днів тому

    Code bhej de bhai

  • @scienceandtechnology6670
    @scienceandtechnology6670 20 днів тому

    bro code ki link send karo

  • @সাব্বির২৩৭
    @সাব্বির২৩৭ 20 днів тому

    Code in comment please

  • @Jkboy_Harashthapa
    @Jkboy_Harashthapa 20 днів тому

    bhai code in comment

  • @tusharkumar1964
    @tusharkumar1964 20 днів тому

    ❤❤❤

  • @DeepakKumar-n9s5i
    @DeepakKumar-n9s5i 20 днів тому

    bouncing ball

  • @tusharkumar1964
    @tusharkumar1964 20 днів тому

    Bro once explain afterwards please

  • @high.01
    @high.01 20 днів тому

    bro send ans