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

added solution for Find Smallest Letter Greater Than Target in c++.

Open Sidd2024 opened this issue 4 years ago • 1 comments

Problem number:- 744 Leetcode linik:- https://leetcode.com/problems/find-smallest-letter-greater-than-target/ Difficulty level:- Easy Time complexity:- O(log(n)) Tags:- binarySearch, array.

#261

Description

here we are given a sorted array , a target. This problem is very similar to "Ceiling/Floor of a number" problem. Note that numbers wrap around which changes only the case where we have to return false if target is not present in array and for this problem we can print the first element if desired target is not found.

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] ["a","b","c","d"]
  • [X] ["l","m","n"]

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

Sidd2024 avatar Oct 24 '21 07:10 Sidd2024

I can tell this is your first pull request! Thank you I'm so honored. :tada::tada::tada: I'll take a look at it ASAP!

welcome[bot] avatar Oct 24 '21 07:10 welcome[bot]