solutions.py
57 subscribers
206 photos
183 links
admin: @Xojarbu
Download Telegram
Title: 1614. Maximum Nesting Depth of the Parentheses
Url: https://leetcode.com/problems/maximum-nesting-depth-of-the-parentheses/
Title: Reverse Words in a String III
Url: https://leetcode.com/problems/reverse-words-in-a-string-iii/
Not best solution, still working )
Title: Add Two Numbers
Url:
Leetcode
Title: Median of Two Sorted Arrays
Url: Leetcode
Title:Determine if String Halves Are Alike
Url:
leetcode
Title: Distribute Candies
Url:
leetcode
Title: Missing Number
Url: leetcode
Title:In-Place Move Zeros to End of List
Url: binarysearch
Title: Buying Cars
Url: binarysearch
Title: Remove Duplicates Occurring More Than Twice
Url:binarysearch
Title: Count Substrings With All 1s
Url:
binarysearch
Title: Unique String Frequencies
Url:
binaryserach
Title: Sum of the Digits (without using string)
Url: binarysearch.com
Level: Easy
Title: Common-Words
Url:
binarysearch.com
Level: Easy

! version2: use max(new_s, new_s2, key=len)can be used to identify the longest set. if so, the case when both sets are equal should be checked too.
! version 3: use builtins for set data type:
e.g
return len(set(new_s).intersection(new_s2))
Title: Pair and Triples
Url: binarysearch.com
Title: 20. Valid Parentheses
Url: leetcode
Time complexity: O(n^2) 😐😐
Title: 191. Number of 1 Bits
Url: leetcode