uz
Feedback
GeeksForGeeks - POTD | GFG POTD Answer

GeeksForGeeks - POTD | GFG POTD Answer

Yopiq kanal

🚩 Channel was restricted by Telegram

Ko'proq ko'rsatish
1 218
Obunachilar
Ma'lumot yo'q24 soatlar
-97 kunlar
-5730 kunlar
Postlar arxiv
πŸ™‹πŸ»β€β™‚οΈLet's CelebrateπŸŽ‰ With Some - πŸ”ΈπŸ‘‰πŸΌβš‘ NEW COURSES βš‘πŸ‘ˆπŸΌπŸ”Έ ⚑Which One To Upload First ⁉️
Anonymous voting

Woohooβ€ΌοΈπŸŽŠ It's FIVE ZERO ZERO😍⚑ Today, We Crossed 500+ Subs❀✨ πŸ”° Thank You All 500❀ πŸ”°
Woohooβ€ΌοΈπŸŽŠ It's FIVE ZERO ZERO😍⚑ Today, We Crossed 500+ Subs❀✨ πŸ”° Thank You All 500❀ πŸ”°

‼️Those Who Only Collect GeekBits‼️ Go To This Link - WEEKLY And Paste This Answer ⬇️⬇️ πŸ‘‰πŸΌβš‘ ANSWER CODE 2 βš‘πŸ‘ˆπŸΌ πŸ‘‰πŸΌ On 2nd Question πŸ‘ˆπŸΌ ⚑Q. Find Bots on Geeklandster⚑

⭐Course πŸ‘‰πŸΌ DOT WEB DEV πŸ’» ‼️Complete 100 Subscribers‼️ ⚑ Then You Can Forward ⚑ πŸ‘‰πŸΌ @GeeksForGeeks_POTD Share To Your Friends For More Courses Like This ✨

8th October : C++ Solution ☝🏼 β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ™‹πŸ»β€β™‚οΈDiscussion ⁉️ Join βœ… @GFG_Answer

class Solution{ public: // Should return head of the modified linked list Node *sortedInsert(struct Node* head, int data) { Node* curr = head; Node* prev = NULL; Node* newNode = new Node(data); while(curr != NULL){ if(curr->data <= data){ prev = curr; curr = curr->next; } else { if(prev == NULL){ newNode->next = curr; head = newNode; } else{ newNode->next = prev->next; prev->next = newNode; } break; } } if(prev != NULL && prev->next == NULL){ prev->next = newNode; } return head; } };

‼️ Dot Web Dev Course ‼️ ⚑Forwarding Option On Chaiye ⁉️
Anonymous voting

7th October : C++ Solution ☝🏼 β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ™‹πŸ»β€β™‚οΈDiscussion ⁉️ Join βœ… @GFG_Answer

class Solution { public: Node* pairWiseSwap(struct Node* head) { if(!head || !head->next) return head; Node*temp=head->next; head->next=pairWiseSwap(head->next->next); temp->next=head; return temp; } };

6th October : C++ Solution ☝🏼 β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ™‹πŸ»β€β™‚οΈDiscussion ⁉️ Join βœ… @GFG_Answer

class Solution { public: void rearrange(struct Node *odd) { if(odd -> next == NULL || odd -> next -> next == NULL) return; Node *oddd = odd; Node *next_odd = odd -> next -> next; Node *even = odd -> next; Node *prev_even = NULL; while(1) { even -> next = prev_even; prev_even = even; if(next_odd == NULL) break; even = next_odd -> next; oddd -> next = next_odd; oddd = next_odd; if(even == NULL) { oddd -> next = prev_even; break; } next_odd = next_odd -> next -> next; } } };

⚑We Are About to Complete 500 Members On This Channel⚑ But, ➑️ Our Discussion Group Has Less Than 200 Members Only. Join Now πŸ‘‰πŸΌ @GFG_Answer ✨

⭐Course πŸ‘‰πŸΌ DOT WEB DEV πŸ’» πŸ‘‰πŸΌ@GeeksForGeeks_POTD Share To Your Friends For More Courses Like This ✨ ‼️Forward Or Save This Text‼️ This Will Be Deleted On 15th October

What Will Be Best Time To Upload Dot Web Dev Course Link ⁉️ JOIN HERE @GeeksForGeeks_POTD
Anonymous voting

5th October : C++ Solution ☝🏼 β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ™‹πŸ»β€β™‚οΈDiscussion ⁉️ Join βœ… @GFG_Answer ⚑Visit Once Daily To Get FREE Codedamn T-Shirt πŸ‘• β€” https://codedamn.com/referred-by/4f24l

class Solution { public: long long int solve(string s, int k) { int n = s.size(); int freq[26] = {0}; int dist_cnt = 0; long long int ans = 0; //ans count int i=0; //start of window int j=0; //end of window while(j k) { freq[s[i]-'a']--; if(freq[s[i]-'a'] == 0) dist_cnt--; i++; } j++; ans += (j-i+1); } return ans; } long long int substrCount(string s, int k) { long long int ans = solve(s,k) - solve(s,k-1); return ans; } };

4th October : C++ Solution ☝🏼 β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ™‹πŸ»β€β™‚οΈDiscussion ⁉️ Join βœ… @GFG_Answer ⚑Visit Once Daily To Get FREE Codedamn T-Shirt πŸ‘• β€” https://codedamn.com/referred-by/4f24l

class Solution { public: int romanToDecimal(string &str) { int sum = 0 ; for(int i = 0; i

3rd October : C++ Solution ☝🏼 β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€” πŸ™‹πŸ»β€β™‚οΈDiscussion ⁉️ Join βœ… @GFG_Answer ⚑Visit Once Daily To Get FREE Codedamn T-Shirt πŸ‘• β€” https://codedamn.com/referred-by/4f24l

class Solution{ public: string colName (long long int n) { string ans=""; while(n){ long long int m=n%26; n/=26; if(m==0){ ans+='Z'; n--; } else{ char c='A'+m-1; ans+=c; } } reverse(ans.begin(),ans.end()); return ans; } };