Pennybase Technology Solutions
OneClickDrive Interview Questions and Answers
Q1. If you have 100 coins with 10 heads and 90 tails, how will you distribute these 100 coins between two person such that they have equal heads. Condition are 1. You are blind.2 you can flip the coin.
Distribute 100 coins with 10 heads and 90 tails between two people equally in spite of being blind.
Flip all the coins and divide them equally between two people.
Since there are 10 heads, there will be 90 tails. So, each person will get 50 coins with 5 heads and 45 tails.
To ensure equal distribution, flip all the coins and divide them into two piles of 50 coins each. Then, each person can take one pile.
Alternatively, flip all the coins and put them in a bag. Each person can th...read more
Q2. If you have 9 bags filled with multicolour ball of weight 10 gm each, one bag has each ball of 9 gm. Find that bag. You have weighing machine. And can weight one times only.
Weigh all bags together, subtract the weight of 8 bags with 10 gm balls from the total weight. The remaining weight is of the bag with 9 gm balls.
Weigh all bags together using the weighing machine.
Calculate the total weight of all balls in the 9 bags with 10 gm balls.
Subtract the weight of 8 bags with 10 gm balls from the total weight.
The remaining weight is of the bag with 9 gm balls.
Q3. What is cloud computing, diff between vm and containers, interpretor and compiler,
Cloud computing is the delivery of computing services over the internet.
VMs are virtual machines that emulate a complete hardware system, while containers are lightweight and share the host OS kernel.
An interpreter translates code into machine language one line at a time, while a compiler translates the entire code into machine language at once.
Q4. Java is platform dependent or independent? Why.
Java is platform independent because of its bytecode and JVM.
Java code is compiled into bytecode which can run on any platform with a JVM
JVM acts as a virtual machine that interprets the bytecode and executes it
This makes Java code platform independent and portable
Java's write once, run anywhere (WORA) principle is based on this
Q5. What is channels and goroutins?
Channels and goroutines are concurrency features in Go programming language.
Goroutines are lightweight threads that allow concurrent execution of functions.
Channels are used for communication and synchronization between goroutines.
Channels can be used to pass data between goroutines.
Channels can be buffered or unbuffered.
Buffered channels have a fixed size and can hold a limited number of values.
Unbuffered channels have no capacity and block until both the sender and receiver...read more
Q6. Coin change problem by dynamic programming
Coin change problem is solved by dynamic programming to find minimum number of coins needed to make a given amount.
Create an array to store minimum number of coins needed for each amount from 0 to target amount
Iterate through each coin denomination and update the array for each amount
Return the value at target amount index of the array
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month