👌1
def solution(S, K):
n = len(S)
res = float('inf')
for i in range(n - K + 1):
t = S[:i] + S[i + K:]
compressed = ''
count = 1
for j in range(1, len(t)):
if t[j] == t[j - 1]:
count += 1
else:
compressed += t[j - 1] + (str(count) if count > 1 else '')
count = 1
if t:
compressed += t[-1] + (str(count) if count > 1 else '')
res = min(res, len(compressed))
return res
Microsoft
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
def solution(s, t):
n = len(s)
sw = s[0] > t[0]
c = 0
for k in range(n):
if s[k] != t[k]:
if (s[k] > t[k]) == sw:
c += 1
return c
Microsoft
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Wipro 12 pm || Offcampus Help done
Test accomplished✅
Those who need Test Clearance 💯
DM
@Mrtrueliving_ix @Mrtrueliving_ix
#WiproElite #offCAMPUS #Round1
Test accomplished
Slot - 1✨
Those who need Test Clearance 💯
DM
@Mrtrueliving_ix @Mrtrueliving_ix
#WiproElite #offCAMPUS #Round1
Please open Telegram to view this post
VIEW IN TELEGRAM
Wipro 12 pm || ON campus Help done
All MCQs + coding+ essay writing✔️ 💯
Test accomplished✅
Those who need Test Clearance
DM
@Mrtrueliving_ix @Mrtrueliving_ix
#WiproElite #OFFCAMPUS #Round1
All MCQs + coding+ essay writing
Test accomplished
Slot - 2✨
Those who need Test Clearance
DM
@Mrtrueliving_ix @Mrtrueliving_ix
#WiproElite #OFFCAMPUS #Round1
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
n = int(input().strip())
print(min(int(input().strip()) for _ in range(n)))
Minimum value
Please open Telegram to view this post
VIEW IN TELEGRAM
WIPRO Elite 3 pm🔻 Help done
2 || 2 slots --- 3pm💻
All MCQs + essay+ Coding done🎉 ✅
Test accomplished📱 💥 💯
All placement help available
DM for help (💯 test Clearance)
@mrtrueliving_ix✔️
@mrtrueliving_ix✔️
#WIPRO #Offcampus #Elite
2 || 2 slots --- 3pm
All MCQs + essay+ Coding done
Test accomplished
All placement help available
DM for help (💯 test Clearance)
@mrtrueliving_ix
@mrtrueliving_ix
#WIPRO #Offcampus #Elite
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM