Skip to content

Instantly share code, notes, and snippets.

View harshalsinha's full-sized avatar

Harshal Sinha harshalsinha

View GitHub Profile
@harshalsinha
harshalsinha / q1.py
Created March 9, 2024 22:11
Maanu 3
def solution(moves):
x_coord = 0
y_coord = 0
right_turns = 0
n = len(moves)
horizontal = '><'
vertical = '^v'
def solution(message, K):
if len(message) <= K:
return message
all_words = message.split(" ")
notification = []
count = 0
for current_word in all_words:
word_len = len(current_word)
def solution(T):
N = len(T)
current_time = 0
result = 0
queue = [(index, T[index]) for index in range(N)]
while queue:
running_len = len(queue)
while running_len:
index, element = queue.pop(0)
current_time += 1