Me VS Me - solving my own case!

  Рет қаралды 479

Diarmuid Early

Diarmuid Early

Күн бұрын

Пікірлер: 8
@shanksingh7613
@shanksingh7613 Ай бұрын
Mind blowing logics
@JeanWolleh
@JeanWolleh Ай бұрын
Great Video, the Level 7 impressed me so much. I replaced matching pairs with a placeholder and also Pairs, that only contained my placeholder as well with a placeholder. so "()" became "oo" and "(oo)" became "oooo" and so on with each type of bracket. After that i searched for the different closing brackets and took the min, as my string was still the same length as in the beginning. but your solution is smart and elegant, just insane. you keep blowing my mind and I keep learning from you, thank you so much ☺
@DimEarly
@DimEarly Ай бұрын
Thanks Jean! JvdV posted this solution on LinkedIn, which takes a pretty similar approach (with a very nice regex): =LEN(REGEXEXTRACT(REDUCE(,ROW(1:99),LAMBDA(x,y,REGEXREPLACE(x,"\[(a*)]|\((a*)\)|\{(a*)}","a$1$2$3a"))),".*?[\]})]")) How did you do the replacement? I'm guessing REDUCE / SUBSTITUTE?
@JeanWolleh
@JeanWolleh Ай бұрын
​ @DimEarly I used REDUCE and also regex, but i didnt know how to define my placement without REPT. So i used a similar pattern, but to define the to replace with, i used REGEXEXTRACT with the same pattern und took the LEN: =REDUCE(G259,SEQUENCE(50),LAMBDA(in,cur,IFERROR(REGEXREPLACE(in,"\((o*)\)|\{(o*)\}|\[(o*)\]",REPT("o",LEN(REGEXEXTRACT(in,"\((o*)\)|\{(o*)\}|\[(o*)\]"))),1),in))) I had no idea how to keep my string at the same length otherwise. I have to do some Research on the pattern used in the formula from JvdV, i don't understand it yet
@JeanWolleh
@JeanWolleh Ай бұрын
ok i Think I atleast get the idea, the $1 is for the first capture group. so if a group captures something, the content stays, as i replace only the brackets and keep the groups, if there is any. and as the groups are only the letters, not the brackets, it works.
@DimEarly
@DimEarly Ай бұрын
@@JeanWolleh Yes, exactly 👍🏻 If you want to learn some more advanced regex, I would definitely follow JvdV. Also, regex101.com is a great resource if you’re trying to understand what a particular pattern does (I needed it to remind me what the lazy operator in the outer regex was doing).
@Harryjackgross
@Harryjackgross Ай бұрын
Tonight I will dream of a 700ft Evil Dim looking down on London and reaching out as orchestral music plays
@DimEarly
@DimEarly Ай бұрын
😂
Gary Knott prime number grid challenge
30:46
Diarmuid Early
Рет қаралды 853
Amazing remote control#devil  #lilith #funny #shorts
00:30
Devil Lilith
Рет қаралды 15 МЛН
Players vs Pitch 🤯
00:26
LE FOOT EN VIDÉO
Рет қаралды 123 МЛН
How Cédric Morgan won the MEWC qualifier
18:25
Diarmuid Early
Рет қаралды 652
A Second Look at the MEWC Qualification 2024 Afternoon Case
1:53:16
Elliott Paterson
Рет қаралды 98
This Is A Story About Talent | Fabi's Response To Dubov
25:29
C-Squared
Рет қаралды 233 М.
Calculus at a Fifth Grade Level
19:06
Lukey B. The Physics G
Рет қаралды 8 МЛН
Excel collegiate challenge - test solve of Kickoff by Chris McNeil
32:01
This Star Is Older Than The Universe and Scientists Can't Explain It
18:26
A calmer second attempt at the MEWC qualifier (afternoon round)
1:16:33
How do QR codes work? (I built one myself to find out)
35:13
Veritasium
Рет қаралды 6 МЛН