We could have simply divid N by 2, and if N is odd the Nth element will become the (N/2 +1)th element of the first series. Whereas if N is even, it is the N/2th element of the second series. Which we can easily find out as we know the r for each series. We don't need a loop at all. It's a simple if-else problem
@laxus77643 жыл бұрын
These questions are nothing compared to what is asked in Qualcomm preliminary exam 😭😭
@shrajalkumar9643 жыл бұрын
the way you explained is really good.... and so is the logic ... apart from that i just wanna ask..... in place of "if(a==1) condition" , can we go with "if(a>1) {a=a*2}" and intiate a and b equals to 1
@deepakbarala15213 жыл бұрын
I found you at right time now I am knows what to do.
@ganesh75373 жыл бұрын
What you will do bhai
@adityanegi69473 жыл бұрын
@@ganesh7537 haha
@ImJhon-jr5tn4 жыл бұрын
Bro! Clearly understand Thank you so much bro!
@ramsunnihith19985 жыл бұрын
We Have just completed with only C & Java how can we write the TCS exam for coding questions. Can You Explain me sir
@uthamkanth25054 жыл бұрын
ram sunnihith The concept is very well explained in this video infact i have my channel which has similar content.pls check, subscribe and show me your support if u like them and give me u r feedback in comment section.thank you:)
@aashishgupta93922 жыл бұрын
bro placement hua kya?
@kamathamvamsi293 жыл бұрын
12:23 I can write in single line let me know this is correct or wrong Read n, Print("%d",(n%2)?pow(3,n/2):pow(2,n/2));
@irfanirfu12294 жыл бұрын
what type of coding questions are asked for Soti campus interview
@Subzero_1015 жыл бұрын
Thx..love from Kakinada 😍
@PrepInsta5 жыл бұрын
:)
@suvashreepriyadarshinibisw80172 жыл бұрын
Clearly understood sir ..the way u explaining it clears all doubts
@laxmikantbotkewar41914 жыл бұрын
can't get the a series from the code above a series always show's output 0
@nehajain8193 жыл бұрын
Thanks prep insta for easy explanation of every problem
@bhaveshrajput50813 жыл бұрын
Hm
@tanmoydebnath88025 жыл бұрын
In TCS drive if I write the program in java using scanner class will it be ok or I have to use command-line argument? I am confused please help
@uthamkanth25054 жыл бұрын
Tanmoy Debnath The concept is very well explained in this video infact i have my channel which has similar content.pls check, subscribe and show me your support if u like them and give me u r feedback in comment section.thank you:)
@jdacademy7215 жыл бұрын
Kya baat hai sir mja aa gya aapaka. Samjhane ka ktarika...dekh k
@shivangigupta27085 жыл бұрын
thanks for providing the solutions!!
@PrepInsta5 жыл бұрын
Thank you
@arqamhussain49814 жыл бұрын
#include #include using namespace std; int main() { int n; cin >> n; int term=0; if (n%2!= 0) term = pow(2, (int)(n/2)); term = pow(3, (int)(n / 2 - 1)); cout
@vishwasvishu1895 Жыл бұрын
Thank you for your great explanation sir
@PrepInsta Жыл бұрын
He there Vishwas! 🤗 We're always here for you guys ❤️ Feel free to reach out to us over Instagram: www.prepinsta.com/instagram/ Or drop a message on bit.ly/prime-wa Or call us on 8448440710. Our mentors would be very glad to help you out with your queries and placement. Team PrepInsta is always here to help!
@ROHITSAHU-pi4fu5 жыл бұрын
Please upload the videos of amcat and cocubes coding questions
@priyam30043 жыл бұрын
Hi how to prepare amcat and cocubes
@akashsingh26555 жыл бұрын
We need to find an output on PC during exam time or we just need to write a code somewhere???
@PrepInsta5 жыл бұрын
They will give you an online compiler in the system which will automatically run your code against pre defined inputs. Three inputs will be show and 3 will be hidden
@abhisheks8024 жыл бұрын
this can be an easy approach..without taking loops and all.. x = int(input("Enter position:")) y = x/2 if (y).is_integer(): y = y-1; z = 1*pow(3,y); z = int(z); else: a = int(y); z = 1*pow(2,a); z = int(z) print(z)
@TamilselvanR5994 жыл бұрын
Why dont u make it constant time complexity? If N is odd: { return 2^Floor(N/2); } If N is even: { Return 3^((N/2)-1); }
@namansaxena86244 жыл бұрын
I was thinking the same thing bro.
@RAHULROY-oc4ro3 жыл бұрын
there's no need of floor function. by default int/int produce result as int, as example 7/2 is 3 by default.
@yasarhussain38115 жыл бұрын
Excellent😍
@PrepInsta5 жыл бұрын
Thank you Yasar
@vnmusic52163 жыл бұрын
In tcs digital should we go for scanf or command line argument fot taking input? Please answer
@sahdevkansal15754 жыл бұрын
Sir can we compile our program during TCS CCQT exam ? In sample test they are asking to write whole program in one line and compilation option is not there .
@vinaypratap6204 жыл бұрын
This logic click in my mind when u are say in this series two series are mix
@m.s.10123 жыл бұрын
Do we allowed to import packages in python during the test?
@manishingale28533 жыл бұрын
Does prepinsta have offline classes in pune?
@mohammedsohail77744 жыл бұрын
I have one query regarding % i have 7.8in ssc But in diploma i have 59.98% In btech i have 60% so i need to know that iam eligible for TCS or not? Plzzz clear my dought
@PrepInsta4 жыл бұрын
Sohail, usually TCS asks for 60 % throughout, so if you have less than 60% in any of your academics so it could be a bummer. But don't lose hope, there will be other opportunities as well.
@kamalakasanKamal3 жыл бұрын
What is the difference between B.E computer science engineering and B.E computer science and technology
@vijayborkar25212 жыл бұрын
There is no difference both are same
@sahuaurobindo92915 жыл бұрын
sir i have done the coding in java but i am getting the whole series. How to get the nth term of the series
@mridulpandey94024 жыл бұрын
You will get the whole series till the position value you have inputed
@hemanthbvs63255 жыл бұрын
I am getting it as site can't be reached now for more codes section
@PrepInsta5 жыл бұрын
Check now, the site would be reachable now :)
@sanketnayak16622 жыл бұрын
Thank you sir 🙏
@shreejitgautam99053 жыл бұрын
You can also use formula a^n-1 and b^n-1 inteads of for lopp
@pavanbegari9301 Жыл бұрын
JAVA program import java.util.*; public class Main{ public static void main(String[]args){ Scanner sc =new Scanner(System.in); int n=sc.nextInt(); int series1=1; int series2=1; if(n%2==0) { for(int i=1;i
@PrepInsta Жыл бұрын
Hey, Join our TA Support Group on Discord, where we will help you out with all your queries: 📍prepinsta.com/discord/ If you are new to discord, please watch our tutorial here❤️: bit.ly/how-to-use-prepinsta-discord-server
@jatinsingh55035 жыл бұрын
Atulya sir you're the best teacher ever !!!!
@manojks79714 жыл бұрын
in python we can easily solve the vowel replacing by under 5 lines so does this make any sense in the exam
@PrepInsta4 жыл бұрын
@manojks79714 жыл бұрын
That's power of python
@nikitasolunke84713 жыл бұрын
Can we use append() in tcs online programming exam
@aswathikp48122 жыл бұрын
Link in description is not working Y?
@FutureAITrend5 жыл бұрын
is command line programming needed for tcs?
@lakshminarayana70205 жыл бұрын
Yes
@FutureAITrend5 жыл бұрын
@@lakshminarayana7020 no i gave the tcs mock test command line is not needed
@abhiramabhiram30133 жыл бұрын
Can we use python as coding in tcs Digital
@anandh19675 жыл бұрын
#include #include #include void main() { int x,term; scanf("%d",&term); if (term%2==0) x= pow(3,term/2-1); else x= pow(2,(term-1)/2); printf("%d",x); getch(); }
@sahithivijayagiri66195 жыл бұрын
Sir please explain programs based command line arguments on c
@daipayanhati23473 жыл бұрын
do they ask qestions on Dynamic programming , Graph etc
@shreeshkant81063 жыл бұрын
Sir logic bnta nhi h can i write alogorithm on copy then write in code form on computer ? I am very basics learner.
@rushabhgothi88803 жыл бұрын
Why couldn't you just use the geometric progression formula
@omkarjoshi483 жыл бұрын
Bro as tcs stated 24 months gap is allowed i filled form for nqt and got selection mail on 25 dec. I failed 2 times in second year but i satisfy all other criteria of 60% throughout academics. During interview he asked me about my gap too. So i hope my year down will not create any problem further?
@arunp28853 жыл бұрын
Are you selected
@prakhararya46974 жыл бұрын
Good
@ayandas87572 жыл бұрын
is there any course for a company which hires on basis of only exams and does require to have 60% aggregate on 12th standard...
@aishwaryadevkar14873 жыл бұрын
Plz gives more codes for practice
@satyanarayanprajapati96654 жыл бұрын
Thanks a lot to understand in easy way..
@-Raviponnam3 жыл бұрын
Thank u sir
@artandcraftideas5202 жыл бұрын
Jupiter coding Test syllabus and notes about those sir please
@2012ankitkumar3 жыл бұрын
can be solved in o(1) time complexity
@ManishSharma-ub9nk3 жыл бұрын
Yes we can, I don't know y he didn't explain
@_BE-A_SaurabhNehe3 жыл бұрын
Yes
@applecutie76453 жыл бұрын
Series starting from 0 wt should I do now
@shubhamtechnical4964 жыл бұрын
Sir, in which programming language the coding would easier Java or Python.
@vm21134 жыл бұрын
Python
@akshay60273 жыл бұрын
Python
@abhiramabhiram30133 жыл бұрын
But most of them said don't use python as coding it causes compilation prbms. Is it true frds??
@swadhin55625 жыл бұрын
where do i get these type of question for placement preparation
@pragyapandey85314 жыл бұрын
Hackerrank
@swadhin55624 жыл бұрын
@@pragyapandey8531 thank you for replying
@princeshukla10255 жыл бұрын
which version of python we can use? python 3 or python 2.7
@vasundharachegudi64995 жыл бұрын
python 3 is best
@rushikamehta413 жыл бұрын
Make a video in sceanrio coding questions
@mayurnimbarte59873 жыл бұрын
Time complexity kitni horni bhai dekha kya if n= 200 rha to rha to kitna time complexity badenga
@bhaveshdalvi5853 жыл бұрын
What to do if there is console error?
@akhilkumarsingh50414 жыл бұрын
Qs-1 draw pattern 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536 131072 262144 524288 1048576 2097152 public class Main { public static void main(String[] args) { int k=1; for(int i=1;i
@bhaveshdalvi5853 жыл бұрын
How to take input?
@088_abhisheksrivastav63 жыл бұрын
Karna kya hai koi ye bataye N th value nikalna hai ya series create karni hai
@justthoughts65344 жыл бұрын
Can we code in python?
@PrepInsta4 жыл бұрын
Yes @aakash you can code in python surely !
@abhiramabhiram30133 жыл бұрын
But most of people saaid not to use python as coding in tcs Digital as it causes compilation prbms??? Is it true??
@aayusingla5 жыл бұрын
In TCS exam how to get a number ... plz help
@sudharsanveeranan13215 жыл бұрын
can't join whatsapp group,it says group's full plzz help
@PrepInsta5 жыл бұрын
We have changed the group link now. Please click again.
@iamthegauravsharma17054 жыл бұрын
JAIHIND SIR KESE HO
@debabratatah48875 жыл бұрын
sir I can not printing the whole series...to print this what I have to do?
@PrepInsta5 жыл бұрын
check the solution here - prepinsta.com/tcs-coding-questions/
@divyajain27333 жыл бұрын
Please upload the program in java
@Manikanta-zu9tm4 жыл бұрын
Thank you so much sir love from RJY
@avanias80003 жыл бұрын
Which language is this
@allalone30345 ай бұрын
tuzya aaicha dana
@prashantmeshram8184 Жыл бұрын
How to print whole series
@PrepInsta Жыл бұрын
Hey, prepinsta.com/discord Kindly connect with us for technical queries. Our mentor would love to guide you Feel free to reach out to us at 8448440710 if you have any query
@Akshay-jl7os5 жыл бұрын
Sir can I update my tcs nqt form after 24 July ??
@shalikasinha90255 жыл бұрын
no
@abhishekgupta98525 жыл бұрын
Sir i saw a 2019 que from ur link ..i have a doubt that in c code why u create function that que is also done by without macking function
@abhishekgupta98525 жыл бұрын
Is it necessary to create function
@PrepInsta5 жыл бұрын
@@abhishekgupta9852 Hey, to make the program easy to understand I created a function but you can follow your own version of approach if you'd like :)
@sandeepsinghrana82324 жыл бұрын
Thankyou Prep Insta.
@simon-yi6jv3 жыл бұрын
Bro I am completing my 2nd year in BTech am I eligible to apply for tcs. Please respond 🙂
@saniya_thousif4 жыл бұрын
Hello sir, I want to join your courses for the preparation of placement, how much does I need to pay
@vaibhavpatel16954 жыл бұрын
#include #include using namespace std; int main () { int n; cout > n; if (n % 2 == 0) { cout
@aashutoshmurthy3 жыл бұрын
My Python Code for the same problem : for n in range(1, 20): if n % 2: print(2 ** (n//2), end=" ") else: print(3 ** (n//2 - 1), end=" ")
@mounisharon38783 жыл бұрын
Can you put the code for python in description box, pls.
@cruzeredge26633 жыл бұрын
num = int(input("Enter num ")) array = [] for i in range(1,num+1): if(i % 2 != 0): if(i == 1): a = 1 array.append(a) else: a = a * 2 array.append(a) else: if(i == 2): b = 1 array.append(b) else: b = b * 3 array.append(b) print(array[-1])
@abhiramabhiram30133 жыл бұрын
Can we use python as coding in digital hiring , but I heared most of them suggested not to use python as it causes compilation prbms , is it true or , I learned only python so pls reaply me frds
@CptSteelballs4 жыл бұрын
don't call yourself a coder if you can't solve even these below average questions on your own.
@PrepInsta4 жыл бұрын
Pankaj, why would the students call themselves coder When they already have a name, right Pankaj !?? :) And keep on practising students, it's never too late to start !!
@CptSteelballs4 жыл бұрын
@@PrepInsta what's your @, i enjoyed your twitter humor. ; )
@rahulsoni68075 жыл бұрын
Plzzz many companies question tell
@wolverine878335 жыл бұрын
Now, I would really appreciate if you provide me the solution for program @ 2:05
@PrepInsta5 жыл бұрын
You can find it here on this page - prepinsta.com/tcs-coding-questions/
@wolverine878335 жыл бұрын
@@PrepInsta Can you provide me the link directly to that solution. It would really help me a lot. Thanks.
@Gamescatchtricks4 жыл бұрын
Bt he question to nhi aaye the
@Vikaskumar-cw3lx5 жыл бұрын
Q:-a man go to the market and buy some product and he find that price of 3 product is bigger than rest of 7 product. For ex- if they shop for 10 items they will give the input as 10 0.2 0.4 0.7 1.31 1.79 1.87 2.13 2.45 2.61 3.11 The output should be printed I single line as 4 Explanation- the 4 costliest items together costed more than all the other items combined. Please send the solution of it in c.
@buffoon31195 жыл бұрын
import java.util.Scanner; public class Main { public static void main(String[] args) { int n; Scanner sc = new Scanner (System.in); n = sc.nextInt(); double[] item = new double[n]; double sum = 0,ex=0; for(int i =0;i=0;j--) { ex=ex+item[j]; sum = sum-item[j]; count++; if(ex>sum) break; } System.out.println(count); } }
@buffoon31195 жыл бұрын
correct me if I'm wrong
@RashmiSingh-gn8eh3 жыл бұрын
👍
@anamsaifi33923 жыл бұрын
Heyy... Please tell.. Can a BCA graduate student give tcs exam.... Anyone with the reply.. Please it's an urgency
@omkarshinde73553 жыл бұрын
yes.. you can give the tcs exam..my friend is also BCA graduate and he selected in TCS .
@anamsaifi33923 жыл бұрын
@@omkarshinde7355 thanks for the help
@mohammadadil43614 жыл бұрын
CORRECT CODE FOR THE SERIES QUESTION IN JAVA LANGUAGE DOWN: import java.io.*; import java.util.*; import java.lang.*; class tcs4 { public static void main(String args[]) { Scanner sc=new Scanner(System.in); System.out.println("Input the nth term"); int n=sc.nextInt();n=n-2; System.out.print("1 1 ");int t=1;int cc=0;int sum=1; while(t
@souravpramanik15472 жыл бұрын
if n=1 then what will be the output?
@hemanthbvs63255 жыл бұрын
I am getting it as site can't be reached now
@PrepInsta5 жыл бұрын
Hey, We think that the issue must have been fixed please check !
@RAHULROY-oc4ro3 жыл бұрын
(n%2 == 0) ? cout
@PrepInsta5 жыл бұрын
if you have any questions please ask us in the comment section below -
@anshuprakash50225 жыл бұрын
sir please help me,cognizant campus in my college on 29th of july,first round is debugging test,please help
@PrepInsta5 жыл бұрын
@@anshuprakash5022 Why don't you join our Cognizant Online Course ??
@anshuprakash50225 жыл бұрын
@@PrepInsta sir I dont think I have much time
@gulshankumar-ls5pk5 жыл бұрын
is command line programming needed for tcs?
@tanmoydebnath88025 жыл бұрын
In TCS drive if I write the program in java using scanner class will it be ok or I have to use command-line argument? I am confused please help
@aishwaryacj56832 ай бұрын
import java.util.*; public class findingTerm{ public static void main(String[] args) { int n; Scanner sc = new Scanner(System.in); System.out.println("Enter The Nth term you want to find"); n = sc.nextInt(); double ans=0; if(n%2 != 0) { int power = (n/2)-1+1; ans= Math.pow(2,power); System.out.println(ans); } else{ int power = (n/2)-1; ans=Math.pow(3,power); System.out.println(ans); } } } Simple code that do not use for loop , but it involves so much of maths when you observe the numbers there you can see 1st number is 2^0 next 3^0 .. wa can observe the pattren 2^0,3^0 ,2^1 ,3^1 ,2^2,3^2 .. and so on