we can use two pointer approach for a optimized solution. is comment ka reply: The solution shown will lead to O(n) time complexity only in the first problem because the two loops are not nested. The first loop runs in O(n) The second loop also runs in O(n) Thus, the overall time complexity of the program is: O(n)+O(n)=O(n)
num=int(input("Enter a Integer: ")) s="" while num > 0:#convering to binary r=num%2 s=str(r)+s num=int(num/2) ts="" for i in s:#toggling the bits if i=="0": ts+="1" else: ts+="0" print(s) print(ts) op=0 for i in range(0,len(ts)):#converting to decimal if ts[::-1][i]=="1": op+=(2**i) print(op)
Fresh grad from a tier-3 college! 🎓 Can't believe Deloitte is hiring off-campus - been grinding aptitude questions like crazy! Really need that PrepInsta Prime to boost my prep game. Manifesting that Deloitte dream! 🤞✨ #FresherLife 🙏
How about you reach out to us over bit.ly/prime-wa or call us on 8448440710 or 080-473-62121. Our mentors would be very glad to help you out with end-to-end Deloitte NLA preparation guidance. Team PrepInsta is always here to help! 💚
@PrepInsta sir prime to free me access nahi ho raha he sir aapne kaha tha top 3 comments ko prepinsta prime free me denge but is per click karne ke baad to yah subscription mang raha he
Apparently it does! How about you reach out to us over bit.ly/prime-wa or call us on 8448440710 or 080-473-62121. Our mentors would be very glad to help you out with end-to-end Deloitte NLA preparation guidance. Team PrepInsta is always here to help! 💚
To start with your Deloitte NLA Preparation: cutt.ly/Deloitte-Nla-Course
Use Coupon code "SHUKLA10" to get maximum discount.
1. Problem will lead to O(n)2 time complexity so rather than this we can use two pointer approach for a optimized solution.
we can use two pointer approach for a optimized solution.
is comment ka reply:
The solution shown will lead to O(n) time complexity only in the first problem because the two loops are not nested.
The first loop runs in O(n)
The second loop also runs in O(n)
Thus, the overall time complexity of the program is:
O(n)+O(n)=O(n)
num=int(input("Enter a Integer: "))
s=""
while num > 0:#convering to binary
r=num%2
s=str(r)+s
num=int(num/2)
ts=""
for i in s:#toggling the bits
if i=="0":
ts+="1"
else:
ts+="0"
print(s)
print(ts)
op=0
for i in range(0,len(ts)):#converting to decimal
if ts[::-1][i]=="1":
op+=(2**i)
print(op)
Fresh grad from a tier-3 college! 🎓 Can't believe Deloitte is hiring off-campus - been grinding aptitude questions like crazy! Really need that PrepInsta Prime to boost my prep game. Manifesting that Deloitte dream! 🤞✨ #FresherLife 🙏
Hey !! thanks for the feedback, also reach out to us anytime on : prepinsta.com/whatsapp/
@PrepInsta but the group is full
I also wanted Prep Insta Prime
Hey !! reach out us on : prepinsta.com/whatsapp/
Sir we need more videos for Deloitte coding round
How about you reach out to us over bit.ly/prime-wa or call us on 8448440710 or 080-473-62121. Our mentors would be very glad to help you out with end-to-end Deloitte NLA preparation guidance.
Team PrepInsta is always here to help! 💚
Thank you so much sir for explain this question
Thanks for the feedback
Very informative video.
Thanks for the feedback!!
If you give the prep insta prime access you will be the one of the reason for my step to success
For prime details please reach out us on : prepinsta.com/whatsapp/
very informative
Glad to hear it!
Are Coding questions and technical assessment necessary at Deloitte (on campus)
Reach out to us : instagram.com/prepinsta.2025/
Hello sir.
How can i access the prepinsta prime
Reach out to us on : prepinsta.com/whatsapp/
@@PrepInsta how can I access this
Sir How can i access the prepinsta prime ?
Hey !! please dm us on : prepinsta.com/whatsapp/
@PrepInsta sir prime to free me access nahi ho raha he sir aapne kaha tha top 3 comments ko prepinsta prime free me denge but is per click karne ke baad to yah subscription mang raha he
sir i have not followed resume format can i reapply with my another email id?
Reach out to us : prepinsta.com/whatsapp/
@@PrepInsta group is full
Thankyou sir
code is not optimized
Please help me sir prime is free for me my education is also on Education loan then please this opportunity give to me to get placed on Deloitte
Coding round clear krna hai toh bata mai free mai sikha dunga
How?@@aaryjoshi5233
Reach out to us on : prepinsta.com/whatsapp/
@@aaryjoshi5233bhai apptitude ke liye tips do quants nhi ata loss profit time work wo chize please!!
in Deloitte nla exam it is compulsory to solve both coding questions?
For more info DM us on : prepinsta.com/whatsapp/
I have a doubt sir could you please help me
Reach out to us on : instagram.com/prepinsta.2025/
I need the link to aaply
Check out our IG page for more updates : instagram.com/prepinsta.2025/
Prime please
Hey ! glad you reach out , Dm us on : instagram.com/prepinsta.2025/
do companies really ask such easy questions ? these questions are not even 800 on cf
Please drop your queries on : prepinsta.com/whatsapp/
Prepinsta
Help me
Reach out to us on : prepinsta.com/whatsapp/
I don't this company should ask that type of questions ⁉️
Apparently it does! How about you reach out to us over bit.ly/prime-wa or call us on 8448440710 or 080-473-62121. Our mentors would be very glad to help you out with end-to-end Deloitte NLA preparation guidance.
Team PrepInsta is always here to help! 💚
import java.util.*;
class Main {
public static void main(String[] args) {
int n=10;
String s="";
while(n>0){
int rem=n%2;
s=s+rem;
n=n/2;
}
StringBuilder sb=new StringBuilder();
for(int i=s.length()-1;i>=0;i--){
sb.append(s.charAt(i));
}
String rev=sb.toString();
StringBuilder sb2=new StringBuilder();
for(int i=0;i
int n;
cin>>n;
int bit=0,cnum=n;
while(cnum){
n^=(1=1;
}
Prime free me milega sch me 🫡
For more details regards to prime reach out us on : prepinsta.com/whatsapp/