Nilimsankar's blog

By Nilimsankar, history, 10 hours ago, In English

While scrolling through Codeforces, I noticed that some accounts labeled as "newbie" are displayed as "grandmaster," while some "grandmaster" accounts appear as "pupil." ****

Full text and comments »

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

By Nilimsankar, history, 4 months ago, In English

Given two arrays, current and desired, each representing the order of n elements, find the minimum number of operations required to transform current into desired.

Operation: - In one operation, you can select an element from the end of the current array and insert it at any position within the array.

Output: - Return the minimum number of such operations needed to make current equal to desired.

TC-1 current — 2 1 3 5 4 desired — 2 4 1 5 3 output = 2

TC-2 current — 2 1 3 desired — 1 2 3 output= 2

Full text and comments »

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