How to create a Logical Operator in Java
Exclusive “or” (xor) Logical Operator
In some scripting languages like PHP, there exists a logical operator (e.g. &&, ||, and, or, …
In-depth guides, insights, and best practices for modern software engineering
Exclusive “or” (xor) Logical Operator
In some scripting languages like PHP, there exists a logical operator (e.g. &&, ||, and, or, …
Write a function that merges two sorted arrays into a single one. The arrays only contain integers. Also, the final outcome must be …
Read Article →Your job is to find the gravitational force between two spherical objects (obj1 , obj2).
arr_val (value array), …It’s a common requirement to be able to zoom in or out while working in the code editor in IntelliJ Idea.
This is achieved on Windows with CTRL+ …
You are playing the following Bulls and Cows game with your friend: You write down a number and ask your friend to guess what the number …
Read Article →Given a binary tree, each node has value `` or 1. Each root-to-leaf path represents a binary number starting with the most significant …
Remove a exclamation mark from the end of string. You can assume that the input data is always a string, no need to verify it.
Let’s play Rock Paper Scissors! You have to return which player won! In case of a draw return Draw!.
Create a function close_compare that accepts 3 parameters: a, b, and an optional margin. The function should return whether a is lower …
It’s the academic year’s end, fateful moment of your school report. The averages must be calculated. All the students come …
Read Article →You’re re-designing a blog and the blog’s posts have the following format for showing the date and time a post was made: …
Read Article →Write a function that converts an input string contains a hex value, and return a decimal.
import org.junit.Test;
import …
Read Article →
For a given string s find the character c (or C) with longest consecutive repetition and return:
Object[]{c, l};
where l (or L) is the …
Create a method that accepts a list and an item, and returns true if the item belongs to the list, otherwise false.
list = …
Read Article →
CREATE USER 'myuser'@'localhost' IDENTIFIED BY 'mypassword';
DROP USER …
Read Article →
Create a function called shortcut to remove all the lowercase vowels in a given string.
shortcut("codewars") # --> …
Read Article →
I needed to find all files in a directory on Linux that ended with the file extension .php.
You …
Read Article →In this tutorial, you will learn how to sort a list in Python, by following the below three steps:
In cryptanalysis, words patterns can be a useful tool in cracking simple ciphers.
A word pattern is a description of the patterns of …
Read Article →Your task is to create functionisDivideBy (or is_divide_by) to check if an integer number is divisible by each out of two arguments.
A …
Read Article →Kubernetes secrets is a great way to store secret values that only Kubernetes can access in your hosted applications.
There are times when you might …
Read Article →Assume "#" is like a backspace in string. This means that string "a#bc#d" actually is "bd"
Your task is to …
Read Article →6174 is known as Kaprekar’s constant after the Indian mathematician D. R. Kaprekar. This number is notable for the following rule: …
Read Article →Given a string s, write a method (function) that will return true if its a valid single integer or floating number or false if its not. …
Read Article →