anmolsainiii23's blog

By anmolsainiii23, history, 7 days ago, In English

You are given an array of n elements and a sum value, you have to calculate the total number of ways to calculate the given sum using the elements of the array by using only addition(+) and subtraction operator(-).

Value of n should lie between [1,15]

array => [-1, 9, 8, -3, 4] value sum => 5

Output -: 8

I have applied Recursion and Memo also but I want a space Optimization Approach for this Question. Please Explain the Working and Time Complexity of this Code and share the Code snippet.

Full text and comments »

  • Vote: I like it
  • -6
  • Vote: I do not like it

By anmolsainiii23, history, 3 months ago, In English

Hey I participated in the Recent Div3 Contest. I was getting TLE at the Test Case3. I was confused where I did wrong. Please can anyone clarify where i did wrong. Any help would be helpful. Thankyou.

Submission Link Problem Link

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By anmolsainiii23, history, 6 months ago, In English

Hi I was wondering how to solve this question. The question actually came today in the weekly contest. The Question Name is -: 2952. Minimum Number of Coins to be Added . And my general approach was to just try recursion here and use pick and not pick approach to find out the element from 1 to Target. It's giving me wrong answer in the Tc -: [1,4,10] Target -: 19. My answer is 3 while the correct answer is 2. Can we try this approach to find out the answer. I know it will give the TLE but just for the practice purpose I want to try recursion here.

Submission Link -: https://leetcode.com/submissions/detail/1111336437/

Full text and comments »

  • Vote: I like it
  • +4
  • Vote: I do not like it

By anmolsainiii23, history, 7 months ago, In English

Hi I was practicing the dp section of CSES and I was Solving this Question Minimizing Coins and I approached Pick and Not Pick for this question. But Couldn't Solve it. This is my Code Code. Can anyone Explain ?

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By anmolsainiii23, history, 7 months ago, In English

Hi I was wondering why can't we use recursive Solution for Coin Piles Solution. This is the Problem

I have tried recursive solution but end up getting TLE and Runtime Error. Can anyone explain whether we can use Recursion or Dynamic Programing. This is my Solution.

This is my Soluion

Full text and comments »

  • Vote: I like it
  • +3
  • Vote: I do not like it

By anmolsainiii23, history, 16 months ago, In English

Can anyone suggest me a good course for competitive Programming?. Please I really need a good course. Please Suggest me.

Full text and comments »

  • Vote: I like it
  • -6
  • Vote: I do not like it

By anmolsainiii23, history, 16 months ago, In English

Dear Codeforces I don't know how your plagiarism checker work. But I think your plagiarism checker is corrupted. I haven't even copy anyone solution and still I'm receiving the threats like this. Please consider this blog entry.

Full text and comments »

  • Vote: I like it
  • -12
  • Vote: I do not like it