fa
Feedback

فریب کلاهبرداران را نخورید! تل‌متریو این کانال‌ها را شناسایی و برچسب‌گذاری می‌کند 👉 برای مشاهده برچسب، اشتراک تهیه کنید

Leetcode with dani

Leetcode with dani

رفتن به کانال در Telegram

Join us and let's tackle leet code questions together: improve your problem-solving skills Preparing for coding interviews learning new algorithms and data structures connect with other coding enthusiasts

نمایش بیشتر
1 240
مشترکین
-124 ساعت
-37 روز
-1730 روز
آرشیو پست ها
Example 1: Input: letters = ["c","f","j"], target = "a" Output: "c" Explanation: The smallest character that is lexicographically greater than 'a' in letters is 'c'. Example 2: Input: letters = ["c","f","j"], target = "c" Output: "f" Explanation: The smallest character that is lexicographically greater than 'c' in letters is 'f'. Example 3: Input: letters = ["x","x","y","y"], target = "z" Output: "x" Explanation: There are no characters in letters that is lexicographically greater than 'z' so we return letters[0]
23 مه 2024, 12:34

744. find the smallest that greater than the target letter #binary_search #leet_code_Q6 #Easy You are given an array of characters letters that is sorted in non-decreasing order, and a character target. There are at least two different characters in letters. Return the smallest character in letters that is lexicographically greater than target. If such a character does not exist, return the first character in letters.
23 مه 2024, 12:33

answer:
23 مه 2024, 11:57

``` class Solution: def search(self, nums: List[int], target: int) -> int: left = 0 right = len(nums)-1 while(left<=right): mid = (left+right)//2 if nums[mid] == target: return mid elif nums[mid] >target: right = mid -1 else: left = mid+1 return -1```
23 مه 2024, 11:57

share ur solution on the comment section or in the group.
23 مه 2024, 09:47

706. Binary Search #Easy #leet_code_Q5 #binary_search Given an array of integers nums which is sorted in ascending order, and an integer target, write a function to search target in nums. If target exists, then return its index. Otherwise, return -1. You must write an algorithm with O(log n) runtime complexity. Example 1: Input: nums = [-1,0,3,5,9,12], target = 9 Output: 4 Explanation: 9 exists in nums and its index is 4 Example 2: Input: nums = [-1,0,3,5,9,12], target = 2 Output: -1 Explanation: 2 does not exist in nums so return -1
23 مه 2024, 09:46

Binary search in 4 minutes
23 مه 2024, 09:13

we will try to solve some problems on binary search so be ready.🥶
23 مه 2024, 09:08

Binary Search Algorithm in 100 Seconds
23 مه 2024, 09:07

How many of you know about the binary search algorithm?
Anonymous voting
23 مه 2024, 08:48

100_Days_of_Code_The_Complete_Python_Pro_Bootcamp_for_2023_p1.rar1610.03 MB
23 مه 2024, 08:32

It is really helpful if you want to learn python.
23 مه 2024, 08:32

I strongly recommend starting to do LeetCode questions as early as possible. Whether you use it in real life or not, many companies ask for this skill during technical interviews, and it's not likely to change anytime soon. So, do as many problems as you can. Thanks!
23 مه 2024, 08:25

ምስጉን ነው በክፉዎች ምክር ያልሄደ፥ በኃጢአተኞችም መንገድ ያልቆመ፥ በዋዘኞችም ወንበር ያልተቀመጠ።
 ነገር ግን በእግዚአ·በሔር ሕግ ደስ ይለዋል፥ ሕጉንም በቀንና በሌሊት ያስባል፡፡
እርሱም በውኃ ፈሳሾች ዳር እንደ ተተከለች፡ ፍሬዋን በየጊዜዋ እንደምትሰጥ፡ ቅጠልዋም እንደማይረግፍ ዛፍ ይሆናል፤ የሚሠራውም ሁሉ ይከናወንለታል።
ክፉዎች እንዲህ አይደሉም፡ ነገር ግን ነፋስ ጠርጎ እንደሚወስደው ትቢያ ናቸው... ስለዚህ ክፉዎች በፍርድ፥ ኃጢአተኞችም በጻድቃን ማኅበር አይቆሙም።
 እግዚአብሔር የጻድቃንን መንገድ ያውቃልና፥ የክፉዎች መንገድ ግን ትጠፋለች።
23 مه 2024, 08:15

ምስጉን ነው በክፉዎች ምክር ያልሄደ፥ በኃጢአተኞችም መንገድ ያልቆመ፥ በዋዘኞችም ወንበር ያልተቀመጠ። ነገር ግን በእግዚአ·በሔር ሕግ ደስ ይለዋል፥ ሕጉንም በቀንና በሌሊት ያስባል፡፡ እርሱም በውኃ ፈሳሾች ዳር እንደ ተተከለች፡ ፍሬዋን በየጊዜዋ እንደምትሰጥ፡ ቅጠልዋም እንደማይረግፍ ዛፍ ይሆናል፤ የሚሠራውም ሁሉ ይከናወንለታል። ክፉዎች እንዲህ አይደሉም፡ ነገር ግን ነፋስ ጠርጎ እንደሚወስደው ትቢያ ናቸው... ስለዚህ ክፉዎች በፍርድ፥ ኃጢአተኞችም በጻድቃን ማኅበር አይቆሙም። 6 እግዚአብሔር የጻድቃንን መንገድ ያውቃልና፥ የክፉዎች መንገድ ግን ትጠፋለች።
23 مه 2024, 08:14
23 مه 2024, ~08:14

do you ready to do another leetcode question??
23 مه 2024, 07:58
23 مه 2024, ~08:17

x = str(x) return x[::-1] == x
23 مه 2024, 07:55

left = 0 x = str(x) right = len(x)-1 while left<= right: if x[left]!= x[right]: return False left+=1 right-=1 return True
23 مه 2024, 07:54

answers that sends From u:
23 مه 2024, 07:54

if you are interested to learn python join this group Python
22 مه 2024, 11:13