Tip 1 : Prepare aptitude if you are applying for TCS
Tip 2 : Have strong knowledge of DSA
Tip 1 : Have projects in your resume
Tip 2 : Be real about your knowledge



F(n) = F(n - 1) + F(n - 2),
Where, F(1) = 1, F(2) = 1
"Indexing is start from 1"
Input: 6
Output: 8
Explanation: The number is ‘6’ so we have to find the “6th” Fibonacci number.
So by using the given formula of the Fibonacci series, we get the series:
[ 1, 1, 2, 3, 5, 8, 13, 21]
So the “6th” element is “8” hence we get the output.
Step 1 : Think of brute force method
Step 2 : Further optimised in DP
Step 3 : Did more space optimisation



Subsequences of string "abc" are: ""(empty string), a, b, c, ab, bc, ac, abc.
Step 1 : The call of recursive will return the LCS (largest common subsequence) of s.substring(i) and t.substring(j), where s.substring(i) is the suffix of s starting at index i.
If the indexes are large enough, at least one of the strings is empty. So no common subsequence exists. Return 0.
Step 2 : If s.charAt(i) == t.charAt(j), then we have found a common character. So whatever subsequence the strings s.substring(i+1) and t.substring(j+1) may have in common, we know how to extend that sequence by 1 character.
Step 3 : Otherwise, we can not really be sure whether it is a good idea to skip one character of s or of t. So we try both via recursion, and take the better result (the maximum).
Step 4 : Now optimised in Memoization



a) Duplicate elements may be present.
b) If no such element is present return -1.
Input: Given a sequence of five numbers 2, 4, 5, 6, 8.
Output: 6
Explanation:
In the given sequence of numbers, number 8 is the largest element, followed by number 6 which is the second-largest element. Hence we return number 6 which is the second-largest element in the sequence.
Step 1 : I give brute force answer which required O(n^2) time complexity.
Step 2 : I further give o(n) approach which required two variables solution.



Input:
'a' = 8, 'b' = 5
Output:
5 8
Explanation:
Initially, the value of 'a' and 'b' is 8 and 5, respectively.
After swapping, the value of 'a' is 5, and the value of 'b' is 8.
Step 1 : I took little time for doing pen paper.
Step 2 : After that my solution is ready I tell the interviewer about my code.
What is Joins?
What are Natural Joins?
Do you know SQL commands?
Write a SQL Query to obtain the employee list which have more than 4 leaves in one month?
Introduction and Projects
Location Preference
Able to work in night shift?
Are you aware of bond?
Why do you want to join TCS?

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
To make an AI less repetitive in a long paragraph, you should increase: