- default_mont_options
- ad_code
- hide_admin
- hide_logged_in
- display_ad
- search_engines
- auto_update
- ip_admin
- cookies_admin
- logged_admin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const res = [] | |
| const used = {} | |
| function permutation(arr, temp){ | |
| if(temp.length == arr.length){ | |
| res.push(temp) | |
| return | |
| } | |
| for(let i = 0; i<arr.length; i++){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # name = "Jahid" | |
| # num = 24 | |
| # is_true = True | |
| # print(is_true) | |
| # a, b = 10, 20 | |
| # if a > b: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Solution: | |
| def isNumber(self, s: str) -> bool: | |
| isFloat = False | |
| for char in s: | |
| if char == "." or char == "e" or char == "E": | |
| isFloat = True | |
| break | |
| try: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import re | |
| import requests | |
| res = requests.get("https://books.toscrape.com/") | |
| pattern = 'href=[\'"](.*?)[\'"]' | |
| links = re.findall(pattern, res.text) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Solution: | |
| def twoSum(self, nums: List[int], target: int) -> List[int]: | |
| sorted_nums = sorted(nums) | |
| res = [] | |
| left = 0; | |
| right = len(sorted_nums) - 1 | |
| while right >= left: | |
| current_sum = sorted_nums[left] + sorted_nums[right] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Solution: | |
| def search_pair(self, arr, target, left, triplets): | |
| right = len(arr) - 1 | |
| while left < right: | |
| current_sum = arr[left] + arr[right] | |
| if current_sum == target: | |
| triplets.append([target * -1, arr[left], arr[right]]) | |
| left += 1 | |
| right -= 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Solution: | |
| def copyRandomList(self, head: 'Optional[Node]') -> 'Optional[Node]': | |
| """ | |
| { | |
| [7,null] : 7, | |
| [13,0] : 13, | |
| [11,4] : 11, | |
| [10,2] : 2, | |
| [1,0] : 1 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Solution: | |
| def hasCycle(self, head: Optional[ListNode]) -> bool: | |
| seen = set() | |
| node = head | |
| while node: | |
| if node in seen: | |
| return True | |
| else: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Solution: | |
| def isPalindrome(self, head: Optional[ListNode]) -> bool: | |
| """ | |
| 1 2 3 4 5 | |
| 1 2 | |
| 2 4 | |
| 3 None | |
| """ | |
| slow, fast = head, head.next | |