1_Hypex_'s blog

By 1_Hypex_, history, 13 months ago, In English

Given an array of positive integers nums of length N, we need to find the maximum sum of two integers that do not have any common digit between them.

1<=N<=2e5 1<=nums[i]<=1e9

Eg. N = 6 nums = 53 1 36 103 53 5 ans = 103+5 = 108

This question was asked as part of Microsoft Online Assessment

Full text and comments »

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

By 1_Hypex_, history, 13 months ago, In English

As an assignment, students at HackerLand High School are to find a subsequence using two strings by performing the below-mentioned operation. Given two strings firstString of length n and secondString of length m, the goal is to make secondString a subsequence of firstString by applying the operation any number of times. In one operation, any single character can be removed from the secondString. The goal is to find the minimum possible difference value which is calculated as: | maximum index of all the characters removed from the string secondString | — |minimum index of all the characters removed from the string secondString |+ 1. Removing a character from secondString does not affect the indices of the other characters and an enmpty string is always a subsequence of firstString.

Example n= 10, first-string = HACKERRANK m=9, secondString = HACKERMAN Remove the character at index 7 to change second string to "HACKERAN", a subsequence of firstString. The difference value is 7 -7+1 =1. Return 1.

Constraints " 1<=n<=10^5 " 1<=m<=10^5

Full text and comments »

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

By 1_Hypex_, history, 2 years ago, In English

After today's round(12-11-22),the next CF round is on 25th. I cannot wait so long for the next contest.I hope more contests are added for this month.

Update: Div 3 round added on 18th.Wohoo!

Full text and comments »

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