RapidOps
10+ TGHY TrustRock Interview Questions and Answers
Q1. What is Time and Space Complexity
Time and Space Complexity refers to the efficiency of an algorithm in terms of time and space usage.
Time Complexity: Measures the amount of time an algorithm takes to run as a function of the input size.
Space Complexity: Measures the amount of memory an algorithm requires as a function of the input size.
Time and space complexity help in analyzing and comparing different algorithms based on their efficiency.
Common notations used to represent time and space complexity are Big O...read more
Q2. What are ooo concepts
Object-oriented programming concepts are principles that help in designing and implementing software solutions using objects and classes.
Encapsulation: Bundling data and methods that operate on the data into a single unit (class)
Inheritance: Ability of a class to inherit properties and behavior from another class
Polymorphism: Ability to present the same interface for different data types
Abstraction: Hiding the complex implementation details and showing only the necessary feat...read more
Q3. Reverse a linked list
Reverse a linked list
Iteratively swap the next and previous pointers of each node
Use three pointers: current, previous, and next
Update the head pointer to the last node after reversing
Q4. Super key word use
The super keyword in programming is used to access and call functions or variables from a parent class.
Used in object-oriented programming languages like Java, C++, and Python
Helps in achieving method overriding and method hiding
Example: super.methodName() or super.variableName
Q5. what do you mean by sortting in python
Sorting in Python refers to arranging elements in a list in a specific order.
Sorting can be done using built-in functions like sorted() or sort()
Elements can be sorted in ascending or descending order
Sorting can be done based on custom key functions
Q6. why use in pop in python
The 'in' keyword in Python is used to check if a value exists in a sequence (list, tuple, string, etc.)
Used to check if a value is present in a sequence
Returns True if value is found, False otherwise
Can be used with lists, tuples, strings, dictionaries, etc.
Q7. differenc of the list between string.
The difference of the list between strings is the unique strings present in each list.
Create two lists of strings
Identify the unique strings in each list
Compare the unique strings to find the difference
Q8. what is tupple in python
A tuple in Python is an immutable collection of elements, similar to a list but cannot be changed once created.
Tuples are created using parentheses ()
Elements in a tuple can be of different data types
Tuples can be accessed using indexing or slicing
Tuples are faster than lists as they are immutable
Q9. what id dictonery in python
A dictionary in Python is a collection of key-value pairs, where each key is unique and maps to a corresponding value.
In Python, dictionaries are created using curly braces {} and key-value pairs separated by colons.
Keys in a dictionary must be immutable objects, such as strings, numbers, or tuples.
Values in a dictionary can be of any data type, including lists, tuples, or even other dictionaries.
Q10. Binary tree and dimeter of BST
A binary tree is a data structure where each node has at most two children. Diameter of a binary tree is the longest path between any two nodes.
Binary tree is a tree data structure where each node has at most two children.
Diameter of a binary tree is the longest path between any two nodes.
In a binary search tree (BST), the diameter is the number of nodes on the longest path between two leaves.
More about working at RapidOps
Interview Process at TGHY TrustRock
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month