How to Swap Node Pairs In Linked List in Java
The challenge
If you are given the head node in a linked list, write a method that swaps each pair of nodes in the list, then returns the head node of …
Read Article →In-depth guides, insights, and best practices for modern software engineering
If you are given the head node in a linked list, write a method that swaps each pair of nodes in the list, then returns the head node of …
Read Article →Neo is somewhere in the Matrix.
public interface Matrix {
public int size();
public int get(int x, int y);
}
You are Morpheus, and …
Read Article →In mathematics, a pandigital number is a number that in a given base has among its significant digits each digit used in the base at …
Read Article →If you need to query meta-data information from your running EC2 instance, you can curl the following location:
curl …
Read Article →
The make_looper() function takes a string (of non-zero length) as an argument. It returns a function. The function it returns will …
In this challenge, you will make a function that converts between camelCase, snake_case, and kebab-case.
You must write a function that …
Read Article →Create a function, that accepts an arbitrary number of arrays and returns a single array generated by alternately appending elements …
Read Article →Complete the greatestProduct method so that it’ll find the greatest product of five consecutive digits in the given string of …
Write a function that calculates the least common multiple of its arguments; each argument is assumed to be a non-negative integer. In …
Read Article →Write a class that, when given a string, will return an uppercase string with each letter shifted forward in the alphabet by however …
Read Article →Create a function that transforms any positive number to a string representing the number in words. The function should work for all …
Read Article →Create a function that converts the value of the String to and from Base64 using the ASCII character set.
Do not use built-in functions. …
Read Article →