Infosys
Texture Global Shipping Interview Questions and Answers
Q1. How we implement threads in python.
Python provides a built-in module 'threading' to implement threads.
Import the 'threading' module
Create a new thread using the 'Thread' class
Define the target function for the thread
Start the thread using the 'start()' method
Join the thread using the 'join()' method
Use locks to synchronize access to shared resources
Q2. What is IP address and DNS
IP address is a unique identifier assigned to devices on a network. DNS is a system that translates domain names to IP addresses.
IP address stands for Internet Protocol address
It is a numerical label assigned to each device connected to a network
It serves as a unique identifier for the device
DNS stands for Domain Name System
It is a system that translates domain names to IP addresses
For example, www.google.com is translated to an IP address like 172.217.6.196
Q3. What are ACID properties.
ACID properties are a set of properties that ensure database transactions are processed reliably.
ACID stands for Atomicity, Consistency, Isolation, and Durability.
Atomicity ensures that a transaction is treated as a single, indivisible unit of work.
Consistency ensures that a transaction brings the database from one valid state to another.
Isolation ensures that concurrent transactions do not interfere with each other.
Durability ensures that once a transaction is committed, it ...read more
Q4. Differences between truncate delete drop
Truncate, delete, and drop are SQL commands used to remove data from a table.
Truncate removes all data from a table and resets the identity column
Delete removes specific rows from a table
Drop removes the entire table from the database
Truncate and drop cannot be rolled back, while delete can be
Truncate is faster than delete as it does not log individual row deletions
Q5. Compare set list tuple.
Set, list, and tuple are data structures in Python with different properties.
A set is an unordered collection of unique elements.
A list is an ordered collection of elements that can be modified.
A tuple is an ordered collection of elements that cannot be modified.
Sets are useful for operations like union, intersection, and difference.
Lists are useful for storing and accessing data in a specific order.
Tuples are useful for returning multiple values from a function or protecting...read more
Q6. Calculate average of an array.
Calculate average of an array.
Loop through the array and add all the elements
Divide the sum by the length of the array
Return the average
Q7. Implement bubble sort.
Bubble sort is a simple sorting algorithm that repeatedly steps through the list, compares adjacent elements and swaps them if they are in the wrong order.
Compare adjacent elements and swap them if they are in the wrong order
Repeat this process until the list is sorted
Time complexity is O(n^2)
Space complexity is O(1)
Example: [5, 3, 8, 4, 2] -> [3, 5, 4, 2, 8] -> [3, 4, 2, 5, 8] -> [3, 2, 4, 5, 8] -> [2, 3, 4, 5, 8] (sorted)
Reviews
Interviews
Salaries
Users/Month