i
Xoriant
Filter interviews by
The answer to the question is a Python function that finds all occurrences of a given substring in a string and returns the count.
Use the `count()` method to find the count of occurrences of a substring in a string.
Iterate through the string and use slicing to check for occurrences of the substring.
Store the occurrences and their counts in a dictionary or a list of tuples.
Shallow copy and Deep copy in Python Difference and how to use?
Shallow copy creates a new object but references the original object's memory address
Deep copy creates a new object with a new memory address and copies the original object's values
Shallow copy can be done using slicing, copy() method, or the built-in list() function
Deep copy can be done using the deepcopy() method from the copy module
Shallow copy is faster...
Yes, we can update a tuple in a list of tuples. However, tuples are immutable, so we need to create a new tuple.
To update a tuple in a list of tuples, we can convert the tuple to a list, update the desired element, and then convert it back to a tuple.
For example, if we have a list of tuples called 'list_of_tuples' and we want to update the second tuple, we can do: list_of_tuples[1] = tuple(updated_list)
Similarly, we ca...
posted on 2 Jul 2024
Simple python programming concepts
Inter service communication in transactional systems involves designing a reliable and efficient way for services to communicate and exchange data.
Use asynchronous messaging systems like RabbitMQ or Kafka to decouple services and ensure reliable message delivery.
Implement RESTful APIs for synchronous communication between services, using HTTP methods like GET, POST, PUT, DELETE.
Consider using gRPC for high-performance,...
Use pandas library for efficient loading and processing of large files in Python.
Use pandas read_csv() function with chunksize parameter to load large files in chunks.
Optimize memory usage by specifying data types for columns in read_csv() function.
Use pandas DataFrame methods like groupby(), merge(), and apply() for efficient data processing.
Consider using Dask library for parallel processing of large datasets.
Use gen...
posted on 30 Jul 2024
A linked list is a data structure consisting of nodes where each node points to the next node in the sequence.
Create a Node class with data and next pointer
Create a LinkedList class with methods like insert, delete, search
Example: Node class - class Node: def __init__(self, data): self.data = data self.next = None
Python oriented topic one hour
I applied via Naukri.com and was interviewed in Aug 2021. There was 1 interview round.
Decorators are functions that modify the behavior of other functions without changing their source code.
Decorators are denoted by the '@' symbol followed by the decorator function name.
They can be used to add functionality to a function, such as logging or timing.
Decorators can also be used to modify the behavior of a class or method.
They are commonly used in web frameworks like Flask and Django.
Examples of built-in de...
Namespace is a container that holds identifiers (names) used to avoid naming conflicts.
Namespace is created at different moments and has different lifetimes.
Python implements namespaces as dictionaries.
There are four types of namespaces in Python: built-in, global, local, and non-local.
Namespaces can be accessed using the dot (.) operator.
Example: 'import math' creates a namespace 'math' that contains all the functions
Algorithm to solve Sudoku puzzle
Create a 9x9 grid to represent the puzzle
Fill in known numbers
For each empty cell, try numbers 1-9 until a valid number is found
Backtrack if no valid number can be found
Repeat until all cells are filled
I applied via LinkedIn and was interviewed in Apr 2021. There was 1 interview round.
Software Engineer
1.7k
salaries
| ₹3.9 L/yr - ₹16 L/yr |
Senior Software Engineer
1.7k
salaries
| ₹9 L/yr - ₹33 L/yr |
Softwaretest Engineer
626
salaries
| ₹2.8 L/yr - ₹8.7 L/yr |
Technical Lead
621
salaries
| ₹12 L/yr - ₹40 L/yr |
Senior Test Engineer
522
salaries
| ₹7.9 L/yr - ₹33 L/yr |
TCS
Infosys
Wipro
Tech Mahindra