TCS Coding Questions with Answers 2020 | (Most Asked)

Поделиться
HTML-код
  • Опубликовано: 8 ноя 2024

Комментарии • 156

  • @PrepInsta
    @PrepInsta  3 года назад +2

    TCS NQT Online Course - bit.ly/TCS-NQT-and-Ninja-Course

  • @harsh_here
    @harsh_here 3 года назад +10

    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

  • @laxus7764
    @laxus7764 3 года назад +27

    These questions are nothing compared to what is asked in Qualcomm preliminary exam 😭😭

  • @deepakbarala1521
    @deepakbarala1521 4 года назад +4

    I found you at right time now I am knows what to do.

  • @shrajalkumar964
    @shrajalkumar964 3 года назад +6

    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

  • @kamathamvamsi29
    @kamathamvamsi29 3 года назад +2

    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));

  • @suvashreepriyadarshinibisw8017
    @suvashreepriyadarshinibisw8017 3 года назад +2

    Clearly understood sir ..the way u explaining it clears all doubts

  • @vishwasvishu1895
    @vishwasvishu1895 2 года назад

    Thank you for your great explanation sir

    • @PrepInsta
      @PrepInsta  2 года назад

      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!

  • @nehajain819
    @nehajain819 4 года назад

    Thanks prep insta for easy explanation of every problem

  • @ImJhon-jr5tn
    @ImJhon-jr5tn 4 года назад +4

    Bro! Clearly understand Thank you so much bro!

  • @pavanbegari9301
    @pavanbegari9301 Год назад +1

    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
      @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

  • @arqamhussain4981
    @arqamhussain4981 4 года назад +4

    #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

  • @jdacademy721
    @jdacademy721 5 лет назад

    Kya baat hai sir mja aa gya aapaka. Samjhane ka ktarika...dekh k

  • @Subzero_101
    @Subzero_101 5 лет назад +5

    Thx..love from Kakinada 😍

  • @ramsunnihith1998
    @ramsunnihith1998 5 лет назад +10

    We Have just completed with only C & Java how can we write the TCS exam for coding questions. Can You Explain me sir

    • @uthamkanth2505
      @uthamkanth2505 4 года назад

      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:)

    • @aashishgupta9392
      @aashishgupta9392 2 года назад

      bro placement hua kya?

  • @TamilselvanR599
    @TamilselvanR599 4 года назад +8

    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);
    }

    • @namansaxena8624
      @namansaxena8624 4 года назад

      I was thinking the same thing bro.

    • @RAHULROY-oc4ro
      @RAHULROY-oc4ro 4 года назад +3

      there's no need of floor function. by default int/int produce result as int, as example 7/2 is 3 by default.

  • @akhilkumarsingh5041
    @akhilkumarsingh5041 4 года назад

    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

  • @sanketnayak1662
    @sanketnayak1662 3 года назад

    Thank you sir 🙏

  • @tanmoydebnath8802
    @tanmoydebnath8802 5 лет назад +7

    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

    • @uthamkanth2505
      @uthamkanth2505 4 года назад

      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:)

  • @irfanirfu1229
    @irfanirfu1229 4 года назад +5

    what type of coding questions are asked for Soti campus interview

  • @abhisheks802
    @abhisheks802 4 года назад

    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)

  • @vnmusic5216
    @vnmusic5216 3 года назад +1

    In tcs digital should we go for scanf or command line argument fot taking input? Please answer

  • @shivangigupta2708
    @shivangigupta2708 5 лет назад +2

    thanks for providing the solutions!!

  • @manishingale2853
    @manishingale2853 3 года назад

    Does prepinsta have offline classes in pune?

  • @satyanarayanprajapati9665
    @satyanarayanprajapati9665 4 года назад

    Thanks a lot to understand in easy way..

  • @shreejitgautam9905
    @shreejitgautam9905 4 года назад

    You can also use formula a^n-1 and b^n-1 inteads of for lopp

  • @jatinsingh5503
    @jatinsingh5503 5 лет назад

    Atulya sir you're the best teacher ever !!!!

  • @m.s.1012
    @m.s.1012 4 года назад

    Do we allowed to import packages in python during the test?

  • @manojks7971
    @manojks7971 4 года назад

    in python we can easily solve the vowel replacing by under 5 lines so does this make any sense in the exam

  • @shubhamtechnical496
    @shubhamtechnical496 4 года назад

    Sir, in which programming language the coding would easier Java or Python.

    • @vm2113
      @vm2113 4 года назад +2

      Python

    • @akshay6027
      @akshay6027 4 года назад

      Python

    • @abhiramabhiram3013
      @abhiramabhiram3013 3 года назад +2

      But most of them said don't use python as coding it causes compilation prbms. Is it true frds??

  • @aswathikp4812
    @aswathikp4812 2 года назад

    Link in description is not working Y?

  • @laxmikantbotkewar4191
    @laxmikantbotkewar4191 5 лет назад +4

    can't get the a series from the code above
    a series always show's output 0

  • @artandcraftideas520
    @artandcraftideas520 3 года назад

    Jupiter coding Test syllabus and notes about those sir please

  • @vinaypratap620
    @vinaypratap620 4 года назад +2

    This logic click in my mind when u are say in this series two series are mix

  • @-Raviponnam
    @-Raviponnam 3 года назад

    Thank u sir

  • @akashsingh2655
    @akashsingh2655 5 лет назад +4

    We need to find an output on PC during exam time or we just need to write a code somewhere???

    • @PrepInsta
      @PrepInsta  5 лет назад +4

      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

  • @ayandas8757
    @ayandas8757 3 года назад

    is there any course for a company which hires on basis of only exams and does require to have 60% aggregate on 12th standard...

  • @rushikamehta41
    @rushikamehta41 3 года назад

    Make a video in sceanrio coding questions

  • @ROHITSAHU-pi4fu
    @ROHITSAHU-pi4fu 5 лет назад +10

    Please upload the videos of amcat and cocubes coding questions

    • @priyam3004
      @priyam3004 3 года назад

      Hi how to prepare amcat and cocubes

  • @daipayanhati2347
    @daipayanhati2347 3 года назад

    do they ask qestions on Dynamic programming , Graph etc

  • @FutureAITrend
    @FutureAITrend 5 лет назад +2

    is command line programming needed for tcs?

  • @anandh1967
    @anandh1967 5 лет назад +2

    #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();
    }

  • @mohammedsohail7774
    @mohammedsohail7774 4 года назад +1

    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

    • @PrepInsta
      @PrepInsta  4 года назад

      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.

  • @applecutie7645
    @applecutie7645 3 года назад

    Series starting from 0 wt should I do now

  • @kamalakasanKamal
    @kamalakasanKamal 4 года назад +2

    What is the difference between B.E computer science engineering and B.E computer science and technology

  • @PrepInsta
    @PrepInsta  5 лет назад

    if you have any questions please ask us in the comment section below -

    • @anshuprakash5022
      @anshuprakash5022 5 лет назад

      sir please help me,cognizant campus in my college on 29th of july,first round is debugging test,please help

    • @PrepInsta
      @PrepInsta  5 лет назад

      @@anshuprakash5022 Why don't you join our Cognizant Online Course ??

    • @anshuprakash5022
      @anshuprakash5022 5 лет назад

      @@PrepInsta sir I dont think I have much time

    • @gulshankumar-ls5pk
      @gulshankumar-ls5pk 5 лет назад

      is command line programming needed for tcs?

    • @tanmoydebnath8802
      @tanmoydebnath8802 5 лет назад

      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

  • @sahdevkansal1575
    @sahdevkansal1575 4 года назад

    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 .

  • @yasarhussain3811
    @yasarhussain3811 5 лет назад +3

    Excellent😍

  • @iamthegauravsharma1705
    @iamthegauravsharma1705 4 года назад

    JAIHIND SIR KESE HO

  • @aishwaryacj5683
    @aishwaryacj5683 4 месяца назад

    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

  • @aishwaryadevkar1487
    @aishwaryadevkar1487 4 года назад +1

    Plz gives more codes for practice

  • @088_abhisheksrivastav6
    @088_abhisheksrivastav6 3 года назад

    Karna kya hai koi ye bataye N th value nikalna hai ya series create karni hai

  • @2012ankitkumar
    @2012ankitkumar 4 года назад +1

    can be solved in o(1) time complexity

  • @princeshukla1025
    @princeshukla1025 5 лет назад

    which version of python we can use? python 3 or python 2.7

  • @sahuaurobindo9291
    @sahuaurobindo9291 5 лет назад +1

    sir i have done the coding in java but i am getting the whole series. How to get the nth term of the series

    • @mridulpandey9402
      @mridulpandey9402 4 года назад

      You will get the whole series till the position value you have inputed

  • @sahithivijayagiri6619
    @sahithivijayagiri6619 5 лет назад +2

    Sir please explain programs based command line arguments on c

  • @shreeshkant8106
    @shreeshkant8106 3 года назад

    Sir logic bnta nhi h can i write alogorithm on copy then write in code form on computer ? I am very basics learner.

  • @justthoughts6534
    @justthoughts6534 4 года назад +1

    Can we code in python?

    • @PrepInsta
      @PrepInsta  4 года назад +2

      Yes @aakash you can code in python surely !

    • @abhiramabhiram3013
      @abhiramabhiram3013 3 года назад

      But most of people saaid not to use python as coding in tcs Digital as it causes compilation prbms??? Is it true??

  • @Manikanta-zu9tm
    @Manikanta-zu9tm 4 года назад

    Thank you so much sir love from RJY

  • @hemanthbvs6325
    @hemanthbvs6325 5 лет назад +2

    I am getting it as site can't be reached now for more codes section

    • @PrepInsta
      @PrepInsta  5 лет назад

      Check now, the site would be reachable now :)

  • @rushabhgothi8880
    @rushabhgothi8880 3 года назад +1

    Why couldn't you just use the geometric progression formula

  • @mayurnimbarte5987
    @mayurnimbarte5987 3 года назад

    Time complexity kitni horni bhai dekha kya if n= 200 rha to rha to kitna time complexity badenga

  • @swadhin5562
    @swadhin5562 5 лет назад +2

    where do i get these type of question for placement preparation

  • @bhaveshdalvi585
    @bhaveshdalvi585 3 года назад

    How to take input?

  • @bhaveshdalvi585
    @bhaveshdalvi585 3 года назад

    What to do if there is console error?

  • @sandeepsinghrana8232
    @sandeepsinghrana8232 4 года назад

    Thankyou Prep Insta.

  • @omkarjoshi48
    @omkarjoshi48 3 года назад +2

    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?

    • @arunp2885
      @arunp2885 3 года назад

      Are you selected

  • @avanias8000
    @avanias8000 4 года назад +1

    Which language is this

  • @originalgangster7853
    @originalgangster7853 5 лет назад

    Good

  • @divyajain2733
    @divyajain2733 4 года назад

    Please upload the program in java

  • @prashantmeshram8184
    @prashantmeshram8184 Год назад

    How to print whole series

    • @PrepInsta
      @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-jl7os
    @Akshay-jl7os 5 лет назад

    Sir can I update my tcs nqt form after 24 July ??

  • @aayusingla
    @aayusingla 5 лет назад

    In TCS exam how to get a number ... plz help

  • @vaibhavpatel1695
    @vaibhavpatel1695 4 года назад

    #include
    #include
    using namespace std;
    int main ()
    {
    int n;
    cout > n;
    if (n % 2 == 0)
    {
    cout

  • @debabratatah4887
    @debabratatah4887 5 лет назад

    sir I can not printing the whole series...to print this what I have to do?

    • @PrepInsta
      @PrepInsta  5 лет назад

      check the solution here - prepinsta.com/tcs-coding-questions/

  • @aashutoshmurthy
    @aashutoshmurthy 3 года назад +1

    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=" ")

  • @saniya_thousif
    @saniya_thousif 4 года назад

    Hello sir, I want to join your courses for the preparation of placement, how much does I need to pay

  • @simon-yi6jv
    @simon-yi6jv 3 года назад

    Bro I am completing my 2nd year in BTech am I eligible to apply for tcs.
    Please respond 🙂

  • @CptSteelballs
    @CptSteelballs 4 года назад +1

    don't call yourself a coder if you can't solve even these below average questions on your own.

    • @PrepInsta
      @PrepInsta  4 года назад +2

      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 !!

    • @CptSteelballs
      @CptSteelballs 4 года назад

      @@PrepInsta what's your @, i enjoyed your twitter humor. ; )

  • @sudharsanveeranan1321
    @sudharsanveeranan1321 5 лет назад +1

    can't join whatsapp group,it says group's full
    plzz help

    • @PrepInsta
      @PrepInsta  5 лет назад +1

      We have changed the group link now. Please click again.

  • @Vikaskumar-cw3lx
    @Vikaskumar-cw3lx 5 лет назад +1

    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.

    • @buffoon3119
      @buffoon3119 5 лет назад +1

      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);
      }
      }

    • @buffoon3119
      @buffoon3119 5 лет назад

      correct me if I'm wrong

  • @mounisharon3878
    @mounisharon3878 4 года назад +1

    Can you put the code for python in description box, pls.

    • @cruzeredge2663
      @cruzeredge2663 4 года назад +1

      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])

    • @abhiramabhiram3013
      @abhiramabhiram3013 3 года назад

      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

  • @RAHULROY-oc4ro
    @RAHULROY-oc4ro 4 года назад

    (n%2 == 0) ? cout

  • @anamsaifi3392
    @anamsaifi3392 3 года назад

    Heyy... Please tell.. Can a BCA graduate student give tcs exam.... Anyone with the reply.. Please it's an urgency

    • @omkarshinde7355
      @omkarshinde7355 3 года назад +1

      yes.. you can give the tcs exam..my friend is also BCA graduate and he selected in TCS .

    • @anamsaifi3392
      @anamsaifi3392 3 года назад

      @@omkarshinde7355 thanks for the help

  • @abhishekgupta9852
    @abhishekgupta9852 5 лет назад

    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

    • @abhishekgupta9852
      @abhishekgupta9852 5 лет назад

      Is it necessary to create function

    • @PrepInsta
      @PrepInsta  5 лет назад +1

      @@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 :)

  • @wolverine87833
    @wolverine87833 5 лет назад +1

    Now, I would really appreciate if you provide me the solution for program @ 2:05

    • @PrepInsta
      @PrepInsta  5 лет назад

      You can find it here on this page - prepinsta.com/tcs-coding-questions/

    • @wolverine87833
      @wolverine87833 5 лет назад

      @@PrepInsta Can you provide me the link directly to that solution.
      It would really help me a lot.
      Thanks.

  • @Gamescatchtricks
    @Gamescatchtricks 4 года назад

    Bt he question to nhi aaye the

  • @rahulsoni6807
    @rahulsoni6807 5 лет назад

    Plzzz many companies question tell

  • @RashmiSingh-gn8eh
    @RashmiSingh-gn8eh 4 года назад

    👍

  • @hemanthbvs6325
    @hemanthbvs6325 5 лет назад

    I am getting it as site can't be reached now

    • @PrepInsta
      @PrepInsta  5 лет назад

      Hey, We think that the issue must have been fixed please check !

  • @mohammadadil4361
    @mohammadadil4361 4 года назад +2

    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

  • @prakhararya4697
    @prakhararya4697 4 года назад +1

    Good