Тёмный

1823. Find the Winner of the Circular Game | Leetcode Daily Challlenge | Maths | DSA | Hindi 

shashCode
Подписаться 16 тыс.
Просмотров 1,9 тыс.
50% 1

Problem Name:
1823. Find the Winner of the Circular Game
Problem Statement:
There are n friends that are playing a game. The friends are sitting in a circle and are numbered from 1 to n in clockwise order. More formally, moving clockwise from the ith friend brings you to the (i+1)th friend for 1 = i n, and moving clockwise from the nth friend brings you to the 1st friend.
The rules of the game are as follows:
Start at the 1st friend.
Count the next k friends in the clockwise direction including the friend you started at. The counting wraps around the circle and may count some friends more than once.
The last friend you counted leaves the circle and loses the game.
If there is still more than one friend in the circle, go back to step 2 starting from the friend immediately clockwise of the friend who just lost and repeat.
Else, the last friend in the circle wins the game.
Given the number of friends, n, and an integer k, return the winner of the game.
Problem Link:
leetcode.com/problems/find-th...
Graph Playlist:
• Graph Data Structure S...
Java Plus DSA Placement Course Playlist:
• Java and DSA Course Pl...
Java Plus DSA Sheet:
docs.google.com/spreadsheets/...
Notes:
github.com/Tiwarishashwat/Jav...
Telegram Link:
shashwattiwari.page.link/tele...
Ultimate Recursion Series Playlist:
• Recursion and Backtrac...
Instagram Handle: (@shashwat_tiwari_st)
shashwattiwari.page.link/shas...
Samsung Interview Experience:
• I cracked Samsung | SR...
Company Tags:
Facebook | Amazon | Microsoft | Netflix | Google | LinkedIn | Pega Systems | VMware | Adobe | Samsung
Timestamp:
0:00 - Introduction
#ShashwatTiwari #coding​​ #problemsolving​

Опубликовано:

 

6 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 20   
@shashwat_tiwari_st
@shashwat_tiwari_st 23 дня назад
All 4 solutions covered. [Last 2 solutions are not easy to come up with :{ ]
@GirjeshSharma-zv3xo
@GirjeshSharma-zv3xo 23 дня назад
Love from Australia❤
@PiyushSharma-we8yd
@PiyushSharma-we8yd 23 дня назад
Finally, checking since morning
@RohitKumar-dz8dh
@RohitKumar-dz8dh 22 дня назад
Thanks 😊
@user-ts1kx7qn8m
@user-ts1kx7qn8m 22 дня назад
It was really helpful , Thanks and keep it up !
@arnab027
@arnab027 22 дня назад
ye story bahut achha laga
@arihantsinghrana2173
@arihantsinghrana2173 22 дня назад
Awesome detailed vid broo!!! Thanks
@GirjeshSharma-zv3xo
@GirjeshSharma-zv3xo 22 дня назад
Love from Urgentina❤
@SAURABHKUMAR-yo7er
@SAURABHKUMAR-yo7er 22 дня назад
best video
@RohitKumar-dz8dh
@RohitKumar-dz8dh 22 дня назад
Did really Josephus iterate the loop in his mind to save himself?
@OnstreamGaming
@OnstreamGaming 22 дня назад
😂😂dont think so
@susmoy4385
@susmoy4385 23 дня назад
Bhaiya .. DSA khatam hone k bad Kiya development playlist ka koi plan hai ??
@DontCare-sl1hq
@DontCare-sl1hq 22 дня назад
Dsa kabhi khatam hoti hai kya 😂 ham khatam hojyange vo nahi
@Shubham-et8qk
@Shubham-et8qk 22 дня назад
DSA khatam bhi hota hai 🧐 Iska sirf start hai end nhi 😬
@OnstreamGaming
@OnstreamGaming 22 дня назад
@@Shubham-et8qk trueeee
@susmoy4385
@susmoy4385 21 день назад
@@DontCare-sl1hq 😂😂
@ashishbisht5359
@ashishbisht5359 22 дня назад
chronology of solutions :- beginner -> intermediate -> advance -> god
@user-ts1kx7qn8m
@user-ts1kx7qn8m 22 дня назад
class Solution(object): def findTheWinner(self, n, k): """ :type n: int :type k: int :rtype: int """ def helper(n): if n == 1: return 0 return (helper( n-1 ) + k) % n return helper(n) + 1 Converted code in python
@vivekkumarsingh9251
@vivekkumarsingh9251 22 дня назад
Bhaiya please add english subtitle in your video.
@OnstreamGaming
@OnstreamGaming 22 дня назад
turn on subtitle and then auto translate to english , i can see the english subtitles as well
Далее
Coding Interviews Be Like
5:31
Просмотров 6 млн
NOOOOO 😂😂😂
00:15
Просмотров 6 млн
How I would learn Leetcode if I could start over
18:03
Просмотров 382 тыс.
The moment we stopped understanding AI [AlexNet]
17:38
Просмотров 808 тыс.
How to Start Leetcode (as a beginner)
8:45
Просмотров 766 тыс.