LeetCode-Solutions icon indicating copy to clipboard operation
LeetCode-Solutions copied to clipboard

added python solution for 387. first unique character in a string

Open blankaex opened this issue 4 years ago • 0 comments

Description

The question is to return the earliest occurrence of a unique character in the string. The solution involves keeping a count of each character in order, and then returning the position of the first character that has a count of 1.

Put check marks:

Have you made changes in README file ?

  • [x] Added problem & solution under correct topic.
  • [x] Specified Space & Time complexity.
  • [x] Specified difficulty level, tag & Note(if any).

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also note any relevant details for your test configuration.

  • [x] Leetcode provided tests

Make sure all below guidelines are followed else PR will get Reject:

  • [x] My code follows the style guidelines of this project
  • [x] I have performed a self-review of my own code
  • [x] I have commented my code so that it is easy to understand
  • [x] I have made corresponding changes to the documentation
  • [x] My changes generate no new warnings
  • [x] Any dependent changes have been merged and published in downstream modules

blankaex avatar Oct 19 '21 06:10 blankaex