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 / 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):
@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 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
@btfak
btfak / useHexo.md
Created May 26, 2016 09:41
How to use Hexo and deploy to GitHub Pages