Skip to content

Instantly share code, notes, and snippets.

View SamirPaulb's full-sized avatar
🟢
Online

Samir Paul SamirPaulb

🟢
Online
View GitHub Profile
@SamirPaulb
SamirPaulb / Count of a repetative Element in a Sorted Array using Binary Search.py
Created April 24, 2021 19:24
To Count a repetative Element in a Sorted Array using Binary Search
def BS_first(ll,key):
left = 0
right = len(ll)-1
while left<=right:
mid = int((left+right)/2)
if key == ll[mid]:
a = mid
right = mid - 1
elif key > ll[mid]:
left = mid +1
@SamirPaulb
SamirPaulb / Singly Linked List ALL methods in one file.py
Created April 24, 2021 19:29
All methods with a singly Linked list
class Node:
def __init__(self,data):
self.data = data
self.next = None
class Linkedlist:
def __init__(self):
self.head = None
# To print the total LinkedList
@SamirPaulb
SamirPaulb / Count of days remaining for the next day with higher temperature Time Complexity N .py
Created April 24, 2021 19:35
determine how many days required to wait for the next warmer day by O(n) from a list
# Function to determine how many days required to wait for the next warmer day
def dailyTemperatures(T):
n = len(T)
# To store the answer
daysOfWait = [-1] * n
s = []
# Traverse all the temperatures
# Python Program To Find out the Maximum Value in Nested List
list2 = []
def get_max(list1):
for i in list1:
if type(i) == list:
get_max(i)
else:
list2.append(i)
return max(list2)
@SamirPaulb
SamirPaulb / Printing Numbers in Triangle Shape | Column wise | Interview Question| reverse Order.py
Created April 26, 2021 19:35
Python Pattern Programs - Printing Numbers in Triangle Shape | Column wise | Interview Question
'''
28
27 21
26 20 15
25 19 14 10
24 18 13 9 6
23 17 12 8 5 3
22 16 11 7 4 2 1
'''
def num(n1):
# print all elements of a matrix with a Single loop
arr = [[0, 1, 2],
[3, 4, 5],
[6, 7, 8]
]
# Method 1
row = len(arr)
col = len(arr[0])
# A Huffman Tree Node
class node:
def __init__(self, freq, symbol, left=None, right=None):
# frequency of symbol
self.freq = freq
# symbol name (character)
self.symbol = symbol
# node left of current node
# A Huffman Tree Node
class node:
def __init__(self, freq, symbol, left=None, right=None):
# frequency of symbol
self.freq = freq
# symbol name (character)
self.symbol = symbol
# node left of current node

I'm soon going to join Amazon Dublin from India and got opportunities to interview with Meta London, Zalando Berlin, Klarna & some other companies. I extensively researched about companies hiring internationally which support visa & relocation for SDE1/2 and above. So sharing list of companies with all of you:

Do consider to UPVOTE, if it helped you.

London

@SamirPaulb
SamirPaulb / system-design.md
Last active March 26, 2023 19:45
Learn how to design systems at scale and prepare for system design interviews.

System Design Course