Useful tips for everyday
How is queue implemented in Java? Answer: Queue in Java is a linear ordered data structure that follows FIFO (First In, First Out) ordering of…
What is %d %s in Python? %s is used as a placeholder for string values you want to inject into a formatted string. %d is…
How to do sum of array using pthreads? Sum of an array using pthreads. Sum of array is a small problem where we have to…
How to check for nested brackets in a string? In this, I also have to check for nested brackets. To achieve this, I wrote this…
What is the score of a perfect bowling game? 300 points In bowling, a perfect game (in 10 pin at least) is 300 points –…
How do you reverse the bit of a number? # Function to reverse bits of a given integer. def reverseBits(n): pos = SIZE – 1…
What happens when you use the Remove Duplicates option? Remove duplicate values When you use the Remove Duplicates feature, the duplicate data will be permanently…
Is there a HashMap in Python? In Python, Hash Tables or Hashmaps are implemented through a built in dictionary. As the name suggests, a dictionary…
How do you compare lists of objects? Java equals() method of List interface compares the specified object with the list for equality. It overrides the…
How to create a list of random unique numbers? Question: How do I create a random list of unique numbers from say 1 to 10,…