TCS NQT October 5 2025 batch Shift 2 Problem 2 Strong Number

Поділитися
Вставка
  • Опубліковано 8 жов 2024
  • In this video, we tackle Problem 2 from the TCS NQT exam held on October 5, 2025 (Shift 2) for the 2025 batch. The problem involves identifying Strong Numbers in a given array.
    A Strong Number is a number where the sum of the factorial of its digits equals the number itself. For example, 145 is a strong number because: 1! + 4! + 5! = 1 + 24 + 120 = 145.
    We break down the logic step by step and walk you through an efficient solution using Java. This video will help you understand:
    How to compute factorials efficiently.
    How to check if a number is strong.
    How to implement the solution using BufferedReader for input.
    Make sure to check out the first part of this video series, where we solve the Train Length problem from the same shift!
    If you’re preparing for TCS or similar exams, this video will give you a solid understanding of how to approach and solve such problems efficiently.
    🔔 Don't forget to like, subscribe, and hit the bell icon for more coding problem solutions and exam preparation tips!

КОМЕНТАРІ • 9

  • @girijaveera3743
    @girijaveera3743 2 дні тому +1

    Thankyou

  • @tanishqnarang1366
    @tanishqnarang1366 20 годин тому

    for the same code I got an error saying "This code exceeds the time limit" 😭

    • @fissioncoding
      @fissioncoding  20 годин тому

      With the optimisation it will give the TLE. See the complete video I have done the brute force and then the optimisation.

  • @rkninja-pc4ko
    @rkninja-pc4ko День тому +1

    For the same code i got only 6 test case passed. And everyone known to me have only passed 6 test cases. I don't know whether the internal test cases provided by TCS is wrong or correct. (If someone faced this 6 test cases passed then comment :))

    • @fissioncoding
      @fissioncoding  День тому

      There might be some issues with the private test cases. If this is the case then normalisation will be done for this shift.

    • @allauddinxtc1795
      @allauddinxtc1795 День тому

      I also faced same issue

    • @Sam__056
      @Sam__056 День тому +1

      probably there is a private testcase which does not have any strong numbers so we end up printing
      the strong numbers in the queue are :
      (basically this case we dont know what to print if there are no strong numbers in the queue.)

    • @mdasadalihaidar1920
      @mdasadalihaidar1920 День тому +1

      ​@@Sam__056 This might be the case. But nothing was said related to the result without any strong numbers.