Expression Add operators | Leetcode | Hard | Java | Striver's A to Z DSA Course/Sheet

preview_player
Показать описание
This problem involves a recursive approach where you need to explore all possible combinations of operators to find the solution. It's a challenging problem, and arriving at the solution intuitively can be tough. Understanding it might also be confusing. I recommend attempting it on your own before viewing the solution. Dry-running the test cases provided can help you better grasp the concept.

Other problems for practice:
Рекомендации по теме
Комментарии
Автор

thank you mam, believe me or not but i solved this question by my own after watching your tutorial only for 5:33 min..🙏🙏

amangupta
Автор

lots of things to figure out in the code . Dry Run to krna hi hoga uske bina lassan na smjh aae

abhisheksinghdangi
Автор

Self-note : (indx, prev, result), prev = curr number with operand(+/-/*), res = res which needs to be matched with target in the function call, base case. and its current value is current then the operation which we have done previously .
prev and res majorly changes in case of * i.e. res = res-prev+(prev*curr), prev = prev*curr

aryansinha
Автор

Couldn't understand a word. This is not how you dry run a recursive code

theLonelyBandit
Автор

bohot dimag kharab kiya is question ne. Apke code ne kafi ache se samjha diya, thankyou so much

saahityabansal
Автор

Thanks for great explanation, keep up the amazing work

ritikshandilya
Автор

Bro use darkmode, my eye hurts >.<, not used to light mode

profesor
Автор

Could you please clarify the explanation? I had difficulty understanding the initial part, which made it challenging to follow the rest of the explanation

ashimsingh
Автор

ratt k pdhate hai sab, intuition kaha hai ? seedha recursive function k parameters lekr shuru kr diya.

chaoticyatan
Автор

maam isn't it a pure Recursion problem, hamne Backracking kahan kari hai isme ?

shashanksaurabh
Автор

Meri job lagte lagte reh gayi kyuki meri preparation ruk gayi thi 😭😭

abhishekdhakad
visit shbcf.ru