GSPANN Technologies
10+ Interview Questions and Answers
Q1. How to add dependency SDKs for perticular build flavour.
To add dependency SDKs for a particular build flavor, modify the build.gradle file and specify the dependencies for that flavor.
Open the build.gradle file for your project
Locate the section for the desired build flavor
Inside the dependencies block, add the necessary SDK dependencies
Sync the project to apply the changes
Q2. What are Coroutines in Kotlin and it's Advantages Over Multithreading.
Coroutines are lightweight threads in Kotlin that allow for asynchronous programming without the overhead of traditional multithreading.
Coroutines are cooperative, meaning they can pause and resume execution at specific points in the code.
They are more efficient than multithreading because they don't require creating new threads for each task.
Coroutines can be used for both CPU-bound and IO-bound tasks.
They simplify error handling and make code more readable.
Example: Using co...read more
Q3. What is MVVM architecture and it's Advantages.
MVVM is a software architecture pattern that separates the user interface from the business logic.
MVVM stands for Model-View-ViewModel.
Model represents the data and business logic.
View represents the user interface.
ViewModel acts as a mediator between the View and Model.
Advantages include easier testing, separation of concerns, and improved maintainability.
Example: Xamarin.Forms uses MVVM architecture for cross-platform mobile app development.
Q4. What RX Java and RXAndroid
RX Java and RXAndroid are reactive programming libraries for Java and Android respectively.
RX Java and RXAndroid allow for asynchronous and event-based programming.
They use Observables and Subscribers to handle data streams.
They simplify complex code and make it easier to handle concurrency.
Example use cases include network requests and UI updates.
RXJava is used in popular Android libraries like Retrofit and Room.
Q5. Spark optimisation techniques
Spark optimisation techniques
Partitioning data to reduce shuffling
Caching frequently used data
Using broadcast variables for small data
Avoiding unnecessary data shuffling
Tuning memory allocation and garbage collection
Using efficient data formats like Parquet
Using appropriate hardware configurations
Optimizing SQL queries using DataFrame and Dataset APIs
Q6. Explain spark architecture
Spark architecture is a distributed computing system that provides high-level APIs for processing large datasets.
Spark architecture consists of a cluster manager, a distributed storage system, and a set of worker nodes.
The cluster manager, such as Apache Mesos or Hadoop YARN, allocates resources and schedules tasks.
The distributed storage system, like Hadoop Distributed File System (HDFS), stores the data across the cluster.
Worker nodes execute the tasks and store intermediat...read more
Q7. write a febonacci series program
A program to generate Fibonacci series
Declare two variables to store the first two numbers of the series
Use a loop to generate the subsequent numbers by adding the previous two
Print the numbers in the series
Q8. Aggregation & grouping in spark
Aggregation & grouping in Spark
Aggregation is the process of combining data from multiple sources into a single result
Grouping is the process of dividing data into groups based on a specific criteria
Spark provides various functions for aggregation and grouping such as groupBy, reduceByKey, aggregateByKey, etc.
These functions can be used to perform operations like sum, count, average, etc. on grouped data
Q9. What is a Fact and Different types of facts?
A fact is a measurable piece of data that represents a specific business aspect. Types include additive, semi-additive, and non-additive facts.
A fact is a piece of data that can be measured and analyzed in a data warehouse
Additive facts can be aggregated across all dimensions, such as sales amount
Semi-additive facts can be aggregated across some dimensions, such as inventory levels
Non-additive facts cannot be aggregated, such as average temperature
Q10. how to extend thread class in java
To extend Thread class in Java, we need to create a new class and inherit it from the Thread class.
Create a new class and inherit it from the Thread class
Override the run() method to define the task that the thread will perform
Instantiate the new class and call the start() method to start the thread
Q11. Input string str= " Name SIRNAME" EXPECTED OUTPUT "Name Sirname"
The expected output is to capitalize the first letter of each word in the input string.
Split the input string by space to get individual words
Capitalize the first letter of each word
Join the words back together with a space in between
Q12. Input str = "Name Sirname" Output "Sirname Name"
Reverse the order of words in a given string.
Split the input string by space to get individual words
Reverse the array of words
Join the words back together with a space in between
Q13. design custom pipe and directives
Custom pipes and directives are used in Angular to transform data and manipulate the DOM.
Custom pipes can be created by implementing the PipeTransform interface and defining a transform method.
Custom directives can be created by using the @Directive decorator and defining the desired behavior.
Example of custom pipe: transforming a string to uppercase.
Example of custom directive: highlighting an element on hover.
Q14. garbage collection of jav
Garbage collection in Java is an automatic process of freeing up memory occupied by objects that are no longer in use.
Garbage collection is performed by JVM
It frees up memory by removing objects that are no longer in use
It helps prevent memory leaks and improves performance
Java provides different types of garbage collectors such as Serial, Parallel, CMS, and G1
Developers can also manually request garbage collection using System.gc() method
Q15. group array of object by key.
Group array of objects by key
Use Array.reduce() method to group objects by key
Create an empty object to store the grouped objects
Iterate over the array and check if the key already exists in the grouped object, if not create a new key and add the object to it
Q16. change detection strategy
Change detection strategy is a method used to identify and track changes in data or state within an application.
Use frameworks like Angular that have built-in change detection mechanisms
Implement manual change detection by comparing previous and current states of data
Leverage immutable data structures to easily detect changes
Interview Process at null
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month