Guys pls share the Accolite Coding mcq to ur friends who writing Accolite 😊👍
Share our channel keep support 👨💻 @Coding_000 ❤️ 4.5k✅
Share our channel keep support 👨💻 @Coding_000 ❤️ 4.5k✅
def treasure_hunt(matrix, m, n):
res = []
k, l = 0, 0
while k < m and l < n:
for i in range(l, n):
res.append(matrix[k][i])
k += 1
for i in range(k, m):
res.append(matrix[i][n - 1])
n -= 1
if k < m:
for i in range(n - 1, l - 1, -1):
res.append(matrix[m - 1][i])
m -= 1
if l < n:
for i in range(m - 1, k - 1, -1):
res.append(matrix[i][l])
l += 1
return res
# Test case 1
matrix = [
[12, 31, 20, 50, 54],
[53, 24, 32, 52, 65],
[38, 10, 99, 1, 44],
[1, 62, 89, 22, 39]
]
m = 4
n = 5
print(*treasure_hunt(matrix, m, n))
# Test case 2
matrix = [
[1, 2, 3],
[4, 5, 6],
[7, 8, 9]
]
m = 3
n = 3
print(*treasure_hunt(matrix, m, n))
res = []
k, l = 0, 0
while k < m and l < n:
for i in range(l, n):
res.append(matrix[k][i])
k += 1
for i in range(k, m):
res.append(matrix[i][n - 1])
n -= 1
if k < m:
for i in range(n - 1, l - 1, -1):
res.append(matrix[m - 1][i])
m -= 1
if l < n:
for i in range(m - 1, k - 1, -1):
res.append(matrix[i][l])
l += 1
return res
# Test case 1
matrix = [
[12, 31, 20, 50, 54],
[53, 24, 32, 52, 65],
[38, 10, 99, 1, 44],
[1, 62, 89, 22, 39]
]
m = 4
n = 5
print(*treasure_hunt(matrix, m, n))
# Test case 2
matrix = [
[1, 2, 3],
[4, 5, 6],
[7, 8, 9]
]
m = 3
n = 3
print(*treasure_hunt(matrix, m, n))
👍1
def check_order(boxes):
stack = []
for box in boxes:
if box in ['(', '{', '[']:
stack.append(box)
else:
if not stack:
return box
if box == ')' and stack[-1] != '(':
return box
if box == '}' and stack[-1] != '{':
return box
if box == ']' and stack[-1] != '[':
return box
stack.pop()
if stack:
return stack[0]
return len(boxes)
boxes = input()
result = check_order(boxes)
if isinstance(result, int):
print(result)
else:
print(result)
L1 M2✅
stack = []
for box in boxes:
if box in ['(', '{', '[']:
stack.append(box)
else:
if not stack:
return box
if box == ')' and stack[-1] != '(':
return box
if box == '}' and stack[-1] != '{':
return box
if box == ']' and stack[-1] != '[':
return box
stack.pop()
if stack:
return stack[0]
return len(boxes)
boxes = input()
result = check_order(boxes)
if isinstance(result, int):
print(result)
else:
print(result)
L1 M2✅
👍1
Coding | EXAMS | IBM ACCENTURE | VIRTUSA | IBM | AMAZON | TCS | EPAM | WILEY EDGE | TECH MAHINDRA | JPMORGAN | HCL | WIPRO
def check_order(boxes): stack = [] for box in boxes: if box in ['(', '{', '[']: stack.append(box) else: if not stack: return box if box == ')' and stack[-1] != '(': …
THis question👆 L1-M2
👍1
def main():
w1 = input().lower()
w2 = input().lower()
w1_list = [0] * 26
w2_list = [0] * 26
for c in w1:
w1_list[ord(c) - ord('a')] += 1
for c in w2:
w2_list[ord(c) - ord('a')] += 1
if w1_list == w2_list:
print(len(w1))
else:
different_letters = []
for i in range(26):
if w1_list[i] != w2_list[i]:
different_letters.append(chr(i + ord('a')))
different_letters.sort()
print("".join(different_letters))
if name == 'main':
main()
WEB dEveloper code ✅ E1
w1 = input().lower()
w2 = input().lower()
w1_list = [0] * 26
w2_list = [0] * 26
for c in w1:
w1_list[ord(c) - ord('a')] += 1
for c in w2:
w2_list[ord(c) - ord('a')] += 1
if w1_list == w2_list:
print(len(w1))
else:
different_letters = []
for i in range(26):
if w1_list[i] != w2_list[i]:
different_letters.append(chr(i + ord('a')))
different_letters.sort()
print("".join(different_letters))
if name == 'main':
main()
WEB dEveloper code ✅ E1
👍2
Any one want projects -mini or Major 😊 Unique project💥💥
Domain AI/ML
contact -@ILOVEU_143 ❤️
Anyone need help in GRE and TOFEL Exam help 👨💻👨💻
SOP , LOR✍📝
Note -paid 🤑
share✅ share ✅@Coding_000
Domain AI/ML
contact -@ILOVEU_143 ❤️
Anyone need help in GRE and TOFEL Exam help 👨💻👨💻
SOP , LOR✍📝
Note -paid 🤑
share✅ share ✅@Coding_000
👍1
In this channel i will share all 2023 batch offcampus job 🤘🤘
https://t.me/Offcampus_000
https://t.me/Offcampus_000
Telegram
Off Campus Updates | AMAZON | IBM | TCS | WIPRO | WILEY EDGE | VIRTUSA | MINDTREE | COGNIZANT
IT Walkins, Off Campus Drives, Walkins, Off Campus Drive & Internship Updates
BE, BTech, ME, MTech, BCA, BSc, MCA, BBA, BBM, MSc, MBA IT Freshers Jobs
Join our group for queries, doubts and discussions
https://t.me/offcampus_000
BE, BTech, ME, MTech, BCA, BSc, MCA, BBA, BBM, MSc, MBA IT Freshers Jobs
Join our group for queries, doubts and discussions
https://t.me/offcampus_000
👍1
Everyone join this for off-campus updates @whitehatcoding❤️
👍2
Happy rose day guys..🌹🌹
👉 @ILOVEU_143 😅
👉 @ILOVEU_143 😅
❤10👍1🥰1😍1
Propose day guys..💍💍
👉 @ILOVEU_143 😅
👉 @ILOVEU_143 😅
❤1🥰1😍1
Wiley edge
Amazon Sde
AMcat
Deliotee
or any exam help available 🔥💯
Book your slot
Contact here @ILOVEU_143✅
Note: It's Paid 💰💰
Share✅ @Coding_000💯💥
💯 Clearance and genuine help
Check all previous proofs 😎💯
Amazon Sde
AMcat
Deliotee
or any exam help available 🔥💯
Book your slot
Contact here @ILOVEU_143✅
Note: It's Paid 💰💰
Share✅ @Coding_000💯💥
💯 Clearance and genuine help
Check all previous proofs 😎💯
👍2🔥1🥰1
Any one want projects -mini or Major 😊 Unique project💥💥
Domain AI/ML
contact -@ILOVEU_143 ❤️
Anyone need help in GRE and TOFEL, GMAT, DUOLINGO Exam help 👨💻👨💻
SOP , LOR✍📝
Note -paid 🤑
share✅ share ✅@Coding_000
Domain AI/ML
contact -@ILOVEU_143 ❤️
Anyone need help in GRE and TOFEL, GMAT, DUOLINGO Exam help 👨💻👨💻
SOP , LOR✍📝
Note -paid 🤑
share✅ share ✅@Coding_000
👍2