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 257
Підписники
Немає даних24 години
Немає даних7 днів
-930 день
Архів дописів
1 257
I just watched an amazing video that dives into the theory of relativity and how time works. ⏳
It’s fascinating how scientists always talk about light, and I used to think they had a beef with speed of light 😂 But now I understand why light speed is so special and its profound connection to time. https://youtu.be/5BBHEZFearI?si=dGWI303LG9XXgQYh
1 257
#leet_code_Q_13 #easy #Sliding_window #Q_219 219. Contains Duplicate II
Given an integer array nums and an integer k, return true if there are two distinct indices i and j in the array such that nums[i] == nums[j] and abs(i - j) <= k.
Example 1:
Input: nums = [1,2,3,1], k = 3
Output: true
Example 2:
Input: nums = [1,0,1,1], k = 1
Output: true
Example 3:
Input: nums = [1,2,3,1,2,3], k = 2
Output: false
1 257
219. Contains Duplicate II
Given an integer array nums and an integer k, return true if there are two distinct indices i and j in the array such that nums[i] == nums[j] and abs(i - j) <= k.
Example 1:
Input: nums = [1,2,3,1], k = 3
Output: true
Example 2:
Input: nums = [1,0,1,1], k = 1
Output: true
Example 3:
Input: nums = [1,2,3,1,2,3], k = 2
Output: false
1 257
i recommend this video for those who want to learn sliding window algorithm , we will be working on this algorithm in the coming days
1 257
What will be the output of the following code?
print('Hello' * 3)
1 257
How do you convert a tuple into a list in Python?
a) tuple.toList()
b) list(tuple)
c) tuple.list()
1 257
class Solution:
def reverseString(self, s: List[str]) -> None:
left, right = 0, len(s) - 1
while left < right:
s[left], s[right] = s[right], s[left]
left += 1
right -= 11 257
⚡️DOGS NEW UPDATE#BITGET wallet እና
#XT Exchange ላይ list ተደርጓል
✅ በቅርቡ ደግሞ 💰LBANK ላይ እና 📈BING X Exchange
ላይ list እንደሚደረግ በ❌ ገፃቸው ላይ አስታውቀዋል ።🔥
🖥NO TAP TAP NO COMBO JUST START THE BOT 😐 🗣
💡 ነጥብ የምታገኙት ⚡️Telegram መጠቀም የጀመራችሁበትን
ዓመት ባማከለ ነው።
1 257
https://t.me/dogshouse_bot/join?startapp=DH2e_MbjR62vRqA4noc4TQ
Who let the DOGS out?
ምንም ሳታደርጉት ቴሌግራም ስለተጠቀማችሁ ብቻ ነዉ የሚከፍለው !
የTelegram username መጀመሪያ ክፈቱ ከሌላችሁ
1 257
#leet_code_Q_12 #easy #two_pointer #Q_202 202.Write an algorithm to determine if a number n is happy.
A happy number is a number defined by the following process:
Starting with any positive integer, replace the number by the sum of the squares of its digits.
Repeat the process until the number equals 1 (where it will stay), or it loops endlessly in a cycle which does not include 1.
Those numbers for which this process ends in 1 are happy.
Return true if n is a happy number, and false if not.
Example 1:
Input: n = 19
Output: true
Explanation:
12 + 92 = 82
82 + 22 = 68
62 + 82 = 100
12 + 02 + 02 = 1
Example 2:
Input: n = 2
Output: false
Constraints:
1 <= n <= 231 - 1
1 257
344. Reverse String
#Topics #two pointers #strings
Write a function that reverses a string. The input string is given as an array of characters s
You must do this by modifying the input array in-place with O(1) extra memory
Example 1:
Input: s = ["h","e","l","l","o"]
Output: ["o","l","l","e","h"]
Example 2:
Input: s = ["H","a","n","n","a","h"]
Output: ["h","a","n","n","a","H"]
1 257
based on this poll we will start doing two pointer and sliding window respectively
1 257
If a coin rolls around a circular path whose circumference is twice the circumference of the coin, how many full rotations does the coin complete by the time it returns to its starting point?
1 257
You wiil get your refferal links by pressing on the button on the bot bottom right side it is already listed on binance use your chance
1 257
Click the link above and click on the start button on the bot then click on join airdrop join the three telegram links and get back to the bot and click on the join air drop button again
Вже доступно! Дослідження Telegram за 2025 — головні інсайти року 
