Verizon
Freecharge Interview Questions and Answers
Q1. b. three ants are running on edges of a equilateral triangle with same speed. What is prob that dey will never meet?
The probability that three ants running on the edges of an equilateral triangle will never meet is 1/3.
The ants will never meet if they all move in the same direction (clockwise or counterclockwise) at the same speed.
The probability of this happening is 1/3, as each ant has two possible directions to choose from.
Example: If one ant starts moving clockwise, the other two ants must also move clockwise to never meet.
Q2. Why do we need garbage collection and how it is done in JAVA ?
Garbage collection is necessary to free up memory occupied by unused objects. Java uses automatic garbage collection.
Garbage collection helps prevent memory leaks and improves performance.
Java uses a mark-and-sweep algorithm to identify and remove unused objects.
The JVM periodically checks for unused objects and frees up memory occupied by them.
Developers can also manually trigger garbage collection using System.gc() method.
Garbage collection can cause temporary pauses in the...read more
Q3. Two puzzles a. Given a bar , cut it twice and pay for 7 days?
This is a classic puzzle where the solution lies in thinking outside the box.
The bar is not a chocolate bar, but a bar of soap.
Cut it twice means to make three pieces.
The solution is to stack the three pieces on top of each other and use them for 7 days.
Q4. Various storage classes in C? Difference between auto, static?
Auto and static are two storage classes in C. Auto variables are local to a function while static variables retain their value between function calls.
Auto variables are created when a function is called and destroyed when the function ends
Static variables are initialized only once and retain their value between function calls
Auto variables have garbage value if not initialized while static variables are initialized to zero by default
Q5. In which scenario do we need UDP ?
UDP is used in scenarios where speed is more important than reliability, such as online gaming and video streaming.
UDP is a connectionless protocol that does not guarantee delivery of packets
It is faster than TCP because it does not have to establish a connection before sending data
UDP is commonly used in online gaming, video streaming, and VoIP applications
It is also used for broadcasting and multicasting data to multiple recipients
Q6. Array sorting – Bubble sort and its complexity?
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.
Bubble sort has a worst-case and average complexity of O(n^2), where n is the number of items being sorted.
It is not efficient for large lists and is generally used for educational purposes.
Example: Sorting an array of strings in alphabetical order using bubble sort.
Q7. Difference between TCP and UDP ?
TCP is a connection-oriented protocol while UDP is connectionless.
TCP provides reliable data transfer while UDP does not guarantee reliability.
TCP uses flow control and congestion control while UDP does not.
TCP is slower than UDP due to the overhead of establishing and maintaining a connection.
UDP is faster than TCP for applications that can tolerate data loss such as video streaming or online gaming.
Top HR Questions asked in Freecharge
Interview Process at Freecharge
Top Software Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month