Skip to content

Instantly share code, notes, and snippets.

View Zahidsqldba07's full-sized avatar
🏠
Working from home

MD ZAHEDUL ISLAM Zahidsqldba07

🏠
Working from home
View GitHub Profile
@Zahidsqldba07
Zahidsqldba07 / crosswordFormation-b.py
Created September 9, 2022 17:44 — forked from yungyuw/crosswordFormation-b.py
crosswordFormation Brute-force solution on Python3
# https://codefights.com/arcade/code-arcade/labyrinth-of-nested-loops/W5Sq7taLSzNHh8GiF
def crosswordFormation(words):
count = 0
for i in range(4):
ta = words[i]
al = len(ta)
for a in range(al - 2):
for j in range(4):
if j == i:
#!/usr/bin/python
#-*- encoding: utf-8 -*-
def spiral_print_matrix(matrix):
height = len(matrix)
if height == 0 or len(matrix[0]) == 0:
return
width = len(matrix[0])
level = height < width and height or width
for i in range((level + 1) / 2):
#!/usr/bin/python
#-*- encoding: utf-8 -*-
def spiral_print_matrix(matrix):
height = len(matrix)
if height == 0 or len(matrix[0]) == 0:
return
width = len(matrix[0])
level = height < width and height or width
for i in range((level + 1) / 2):
@Zahidsqldba07
Zahidsqldba07 / hasPathWithGivenSum.py
Created September 9, 2022 07:54 — forked from sheldonrobinson/hasPathWithGivenSum.py
CodeSignal Solution hasPathWithGivenSum
#
# Binary trees are already defined with this interface:
# class Tree(object):
# def __init__(self, x):
# self.value = x
# self.left = None
# self.right = None
def hasPathWithGivenSum(t, s):
if t is None:
if s==0:
@Zahidsqldba07
Zahidsqldba07 / removeKFromList.py
Created September 8, 2022 14:55 — forked from sheldonrobinson/removeKFromList.py
CodeSignal Solution removeKFromList
# Singly-linked lists are already defined with this interface:
# class ListNode(object):
# def __init__(self, x):
# self.value = x
# self.next = None
#
def removeKFromList(l, k):
if l == None:
return l
while l != None and l.value == k:
@Zahidsqldba07
Zahidsqldba07 / removeKFromList.py
Created September 8, 2022 14:55 — forked from sheldonrobinson/removeKFromList.py
CodeSignal Solution removeKFromList
# Singly-linked lists are already defined with this interface:
# class ListNode(object):
# def __init__(self, x):
# self.value = x
# self.next = None
#
def removeKFromList(l, k):
if l == None:
return l
while l != None and l.value == k:
Note: Try to solve this task in-place (with O(1) additional memory), since this is what you'll be asked to do during an interview.
You are given an n x n 2D matrix that represents an image. Rotate the image by 90 degrees (clockwise).
Example
For
a = [[1, 2, 3],
@Zahidsqldba07
Zahidsqldba07 / linkedin-auto-connect.js
Created August 31, 2022 10:00 — forked from phpenterprise/linkedin-auto-connect.js
Linkedin Auto Connect/Invite Script
(Linkedin = {
release: '1.0.5 stable',
data: {},
config: {
autoStart: true,
inspectorSpeed: 5000,
sendSpeed: 4000,
pagerSpeed: 10000,
scrollDownAuto: 600,
debug: true,
@Zahidsqldba07
Zahidsqldba07 / Guess#.py
Created July 9, 2022 12:27 — forked from cguldner/Guess#.py
A simple number game that I built using python
import random #bring in the random number
import time
number=random.randint(1, 200) #pick the number between 1 and 200
def intro():
print("May I ask you for your name?")
name=input() #asks for the name
print(name + ", we are going to play a game. I am thinking of a number between 1 and 200")
time.sleep(.5)
print("Go ahead. Guess!")