Tredence Previous Year Coding Questions and Hiring Process
Tredence Analytics is a data analytics and AI consulting company headquartered in San Jose with a large India presence in Bengaluru, Pune, and Chennai. It hires freshers across several tracks, Software Engineer, Data Analyst, Data Engineer, and Business Analyst, and the exact process and topics tested vary somewhat depending on which track you are applying for.
If you are preparing for Tredence, understanding the online assessment format, the SQL and Python heavy technical interview, and the case study or guesstimate round will help you prepare efficiently. This guide covers the complete Tredence hiring process along with previous year coding questions asked in its online assessments and interviews.
Tredence Hiring Process
Here is the typical flow for Tredence fresher hiring through campus and off campus drives. Exact rounds vary by track, a Software Engineer drive leans more on DSA, while a Data Analyst or Business Analyst drive leans more on SQL, Python, and case studies.
| Stage | What Happens | What They Are Looking For |
|---|---|---|
| A test, historically on AMCAT or HackerEarth, around 2 hours, covering aptitude, verbal ability, two to three coding problems, and for analyst tracks, SQL and Python questions plus a short case study or guesstimate writing task. | Breadth across fundamentals and working code or queries. |
| One or two rounds covering SQL, DSA basics, OOP fundamentals, DBMS concepts, and for analyst tracks, Python, statistics, and machine learning basics, alongside a deep dive into your resume and projects. | Depth in your stated skills and ability to defend your projects. |
| A business scenario or estimation problem discussed out loud, common for Data Analyst and Business Analyst tracks, sometimes combined with an overall profile and communication assessment. | Structured thinking and communication under ambiguity. |
| A conversation about your background, career motivation, and sometimes a second round covering relocation and logistics. | Genuine interest and cultural fit. |
Selection funnels at Tredence are steep, with some drives narrowing several hundred applicants down to single digit offers, so treat every round as meaningful rather than a formality.
Assessment Pattern
Format: A proctored online test, historically on AMCAT or HackerEarth depending on the drive, sometimes paired with a separate spoken English assessment on Mettl.
Sections typically included:
- Aptitude and Verbal: Quantitative aptitude such as time speed distance, profit and loss, and averages, plus verbal ability and grammar.
- Coding Round: Two to three problems covering trees, arrays, math, matrices, dynamic programming, or bit manipulation, varying by drive.
- SQL and Python (Analyst Tracks): MCQs and short problems on SQL and Python, sometimes alongside data structures, machine learning, and deep learning basics.
- Case Study or Guesstimate: A short written estimation or business scenario question, more common on Data Analyst and Business Analyst drives.
Some drives add further variety to this structure. A Business Analyst cohort reported a Computer Programming section with three separate questions on dynamic programming and bit manipulation, and a separate essay writing task on a general topic such as "My first day at college." An AMCAT based campus drive at NIT Jamshedpur structured its written test as verbal ability, data interpretation using bar and pie charts, and a dedicated business analysis section covering supply and demand and pricing strategy concepts. Another candidate reported an OA with 30 MCQs on OOP and SQL, one guesstimate question, one essay writing question, and three separate DSA programming questions.
Tredence Coding Round: What to Expect
The coding round at Tredence blends standard DSA problems with a few analytics adjacent logic problems. Frequently reported topics include:
- Tree problems such as checking whether one tree is a subtree of another
- Matrix problems such as matrix multiplication or counting islands using DFS
- Array and string problems, including finding the smallest possible number from a given set of digits
- Dynamic programming and bit manipulation problems on some drives
- Classic sorting algorithm implementations, bubble sort, selection sort, quicksort, and merge sort
For hands on practice, use:
A separate technical round for a Data Analyst drive also reported a distinct matrix based question, described as a matrix swap problem, and a dictionary or heap based coding problem, though their exact statements were not recoverable from public sources. Candidates have also reported OA problems by name only, without the full statement being publicly available, including Count Occurrences, Media Queries, Master Chefs, Game of Thrones, Parenting Study, Walls, and Arrange Points. Treat these as a signal of Tredence's OA style and topic variety rather than problems to solve verbatim, since their exact statements were not recoverable from public sources.
SQL, Python, and Analytics Focus Areas
Real questions reported by candidates, especially on Data Analyst and Business Analyst tracks:
- What is the difference between the WHERE and HAVING clauses in SQL.
- Explain the COALESCE function in SQL.
- Write SQL queries involving joins and subqueries.
- Explain ACID properties and transactions, and the different states a transaction can be in.
- Explain Dijkstra's algorithm, its limitation with negative edge weights, and why Bellman-Ford is used instead. Be ready to write pseudocode for Dijkstra's algorithm.
- Explain function overriding versus overloading in Java.
- Explain K nearest neighbours, K means clustering, and linear regression, and compare them.
- Discuss Pandas data types if your project used Python for data work.
- Explain your machine learning project end to end, including the algorithms used.
- Questions on model deployment and cloud basics if relevant to your project.
- How is a Business Analyst role different from a Machine Learning Engineer role.
- Probability and permutation or combination questions.
- For Data Engineer roles, questions on data pipelines, ETL, data transformation, joins, and aggregations tied to your past project work.
- A cinema seating SQL problem: given a table of seats with an occupied flag, find free seats that have another free seat next to them, typically solved with
LEAD,LAG, orROW_NUMBERwindow functions. - A PySpark filtering task on a student DataFrame: find students whose first name is exactly six letters long and ends in the letter "h".
- Write SQL to retrieve positive, negative, and zero values separately from a numeric column.
- Remove duplicates from a list in Python.
- How do you join two DataFrames in PySpark, and how do you get the top N rows from the joined result.
- How do you decide whether a Spark transformation is narrow or wide.
Guesstimates and Case Studies
Tredence leans on estimation and business scenario questions more than most companies, especially for analyst tracks. Reported questions include:
- Estimate the total number of cars in Delhi.
- Estimate the total number of iPhones in your home town or village.
- Estimate the number of tennis balls sold in India in one year.
- A logic puzzle involving four pages marked with x, y, 1, and 2, where you must find the minimum number of flips needed.
- A boarding pass sequencing logic puzzle.
- A variant of the classic puzzle where a group must cross a bridge at night using a single torch, with different crossing speeds per person.
- Estimate the number of senior citizens using WhatsApp in India.
- Estimate the number of wedding dresses sold in India per year.
- Estimate the number of cigarettes sold in India per year.
Structure your answer out loud, state your assumptions clearly, and walk through your reasoning rather than jumping straight to a final number.
Reported case study and scenario questions add further business framing beyond pure estimation:
- The mayor of Bangalore Municipal Corporation says the city scored badly on the Swachh Bharat Abhiyan survey and wants to improve. He will only answer five direct questions, no indirect or multi part questions allowed. What five questions do you ask him.
- What would you do if you were given five crore rupees right now.
- What factors would an e-marketing company consider when deciding on a discount for electronic gadgets.
- Build a flowchart based on a given problem statement, sometimes paired with a group case study exercise built around running a shopping store.
HR Interview Tips
The HR round checks communication, motivation, and overall fit. Common questions include:
- Tell me about yourself, beyond what is already on your resume.
- What are your strengths and weaknesses.
- Why were you rejected in your previous interviews, if applicable.
- Walk me through what you would do between now and Monday morning if your interview were in Bangalore and today is Friday.
- Are you willing to relocate.
- Tell me about your hobbies.
- If you are from a core engineering branch, be ready to explain why you are moving into machine learning or analytics.
- What do you understand to be the daily responsibilities of an analyst.
- Do you hold any data science related certifications.
- What has been the most frustrating period of your life, and how did you handle it.
- Convince me that I should never write a poem.
- Mention your three best technical skills.
Complete HR Interview Questions
Resources to Prepare for Tredence
- Free Aptitude Mock Practice latest patterns and mock tests
- ATS Score Checker and Resume Optimizer
- Roadmaps
- Interview Questions
- Resume Templates
- Free Placement Materials (Google Drive)
- Interview Experience
Tredence Previous Year Coding Questions
Below is a list of Tredence previous year coding questions commonly reported by candidates in the online assessment and technical interview. Each question includes a problem statement, input and output format, and a sample explanation.
1. Check if One Binary Tree Is a Subtree of Another
Problem Statement: Given two binary trees, determine whether the second tree exists as an exact subtree within the first tree.
Input Format:
- Two binary trees,
rootandsubRoot
Output Format:
"Yes"or"No"
Example:
Input: root = [3,4,5,1,2], subRoot = [4,1,2]
Output: Yes
2. Matrix Multiplication
Problem Statement: Given two matrices, multiply them and return the resulting matrix, or indicate that multiplication is not possible if their dimensions are incompatible.
Input Format:
- Two 2D integer matrices
AandB
Output Format:
- The product matrix, or a message that multiplication is not possible
Example:
Input: A = [[1,2],[3,4]], B = [[5,6],[7,8]]
Output: [[19,22],[43,50]]
3. Count the Number of Islands in a Boolean Matrix
Problem Statement: Given a 2D grid of 1s representing land and 0s representing water, count the number of islands, where an island is a group of connected 1s in four or eight directions.
Input Format:
- A 2D grid of 0s and 1s
Output Format:
- The number of islands
Example:
Input: [[1,1,0],[0,1,0],[0,0,1]]
Output: 2
4. Maximum Water Storage Between Two Buildings
Problem Statement: Given an array where each element represents a building's height, find two buildings that, together with the line connecting them, form a container that holds the most water.
Input Format:
- An integer array
heights
Output Format:
- The maximum water that can be stored
Example:
Input: [1,8,6,2,5,4,8,3,7]
Output: 49
5. Smallest Number of a Given Length Using a Set of Digits
Problem Statement: Given a set of allowed digits and a target length, form the smallest possible number of that length using only the allowed digits, reusing digits as needed.
Input Format:
- A set of allowed digits and an integer
length
Output Format:
- The smallest number of the given length using only the allowed digits
Example:
Input: digits = [1, 3, 5], length = 3
Output: 111
6. The Swap Function Puzzle
Problem Statement: A function is described as returning 2 when given an input of 3, and returning 3 when given an input of 2. Implement the underlying logic and explain what general operation it performs.
Input Format:
- An integer input to the function
Output Format:
- The function's output following the described swapping behaviour
Example:
Input: 3
Output: 2
7. Implement Classic Sorting Algorithms
Problem Statement: Given an array of integers, sort it in ascending order. Be ready to implement and explain bubble sort, selection sort, quicksort, and merge sort, and to discuss their time and space complexity.
Input Format:
- An integer array
arr
Output Format:
- The sorted array
Example:
Input: [5, 2, 8, 1, 9]
Output: [1, 2, 5, 8, 9]
8. Coin Change
Problem Statement: Given an array of coin denominations and a target amount, find the fewest number of coins needed to make up that amount using unlimited supply of each denomination. Return -1 if the amount cannot be made.
Input Format:
- An integer array
coins - An integer
amount
Output Format:
- The minimum number of coins, or
-1if not possible
Example:
Input: coins = [1, 2, 5], amount = 11
Output: 3
9. User Registration System
Problem Statement:
You are given N user registration requests, one name at a time. For each request, print "YES" if the name already exists in the database, otherwise print "NO" and add the name to the database.
Input Format:
- An integer
N - N strings representing registration names, in order
Output Format:
- N lines, each
"YES"or"NO"
Example:
Input: ["alice", "bob", "alice", "carol"]
Output: NO, NO, YES, NO
10. Smallest Substring Containing All Distinct Characters
Problem Statement: Given a string of lowercase letters, find the length of the smallest substring that contains every distinct character present in the string at least once.
Input Format:
- A string
sof lowercase letters, up to 100,000 characters
Output Format:
- The length of the smallest such substring
Example:
Input: "aabcbcdbca"
Output: 4
11. Mystery Keys
Problem Statement: Given an integer N, count the number of triplets of prime numbers (x, y, z) with 1 ≤ x < y < z ≤ N such that x XOR y XOR z equals 0.
Input Format:
- An integer
N
Output Format:
- The count of valid triplets
Example:
Input: N = 10
Output: 1
Explanation: The primes up to 10 are 2, 3, 5, 7. The triplet (2, 5, 7) satisfies 2 XOR 5 XOR 7 = 0.
12. T-Missing Element
Problem Statement: Given two integer arrays A and B, each of size N, print the smallest number that is present in A but missing from B. Print -1 if every element of A is present in B.
Input Format:
- An integer array
A - An integer array
B
Output Format:
- The smallest missing number, or
-1
Example:
Input: A = [4, 2, 7, 1], B = [7, 4, 1]
Output: 2
At Last
Tredence tests a wider mix than most companies because it hires across software engineering and analytics tracks, so tailor your preparation to the role you are applying for. If you are targeting a Data Analyst or Business Analyst role, weight your prep toward SQL, Python, statistics, and guesstimates. If you are targeting Software Engineer, focus more on DSA and core CS fundamentals, without neglecting SQL entirely since it comes up across tracks.
Join the Telegram group for more resources and discussions.