Teradata Interview for SWE intern
Summary
I had two interview rounds for a Software Engineer Intern position at Teradata, covering Java fundamentals, OOP concepts, DSA problems, and a design problem.
Full Experience
I got an email for round 1 of interview. Round-1: Java: first he asked me about how strings work in java (about stringpool, why string are immutable), what is pass by object and pass by reference in java OOPS: what is polymorphism explain me the run time and compile time polymorphism and some basics on static keyword and other pillars DSA: Valid parenthesis question https://leetcode.com/problems/valid-parentheses/description/ Return the first unique character in a given string
Round-2: Design Round: Design a Data structure that can perform insert, delete, search and genrate a random number in O(1)-- avg time.(no duplicates) https://leetcode.com/problems/insert-delete-getrandom-o1/description/ Follow up questions: If you don't know the Random method in java how would implement it on your own Now redesign the Data structure such that it will accept duplicates also.
Interview Questions (5)
Valid Parentheses
Given a string containing only the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if open brackets are closed by the same type of brackets, and open brackets are closed in the correct order.
First Unique Character in a String
Given a string, return the index of the first non‑repeating character. If no such character exists, return -1.
Insert Delete GetRandom O(1)
Design a data structure that supports insert(val), delete(val), search(val) and getRandom() operations in average O(1) time, without allowing duplicate elements.
Implement Random Method in Java
Explain how you would implement a random number generator in Java without using the built‑in Random class.
Design Insert Delete GetRandom with Duplicates
Redesign the data structure to support insert, delete, search, and getRandom operations in average O(1) time while allowing duplicate elements.