Skip to content

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

@muskansngh07

Description

@muskansngh07

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions