Java icon indicating copy to clipboard operation
Java copied to clipboard

[FEATURE REQUEST] Add more codes to the string folder.

Open muskansngh07 opened this issue 2 months ago • 6 comments

What would you like to Propose?

Hey, More codes can be added to the string folder of the repo which are as follows:

  1. Removing stars from a string.
  2. Complex number multiplication.

Issue details

  1. Removing stars from the string. You are given a string s, which contains stars *.

In one operation, you can:

  • Choose a star in s.
  • Remove the closest non-star character to its left, as well as remove the star itself.
  • Return the string after all stars have been removed.

Note:

The input will be generated such that the operation is always possible. It can be shown that the resulting string will always be unique.

Example :

Input: s = "leet**cod*e" Output: "lecoe"

  1. Complex Number multiplication. A complex number can be represented as a string on the form "real+imaginaryi" where:
  • real is the real part and is an integer in the range [-100, 100].
  • imaginary is the imaginary part and is an integer in the range [-100, 100].
  • i2 == -1. Given two complex numbers num1 and num2 as strings, return a string of the complex number that represents their multiplications.

Example :

Input: num1 = "1+1i", num2 = "1+1i" Output: "0+2i"

Additional Information

I can help you with this. Therefore, I request you to assign this issue to me.

muskansngh07 avatar Oct 04 '25 20:10 muskansngh07