Posts by Siddharth Raja

Author Biographical Info: Not available

Position of a robot after given movements in C++

By Siddharth Raja

In this tutorial, we will write a C++ program to find the final position of a robot from the given movements. Let us consider a robot that can move in a 2-Dimensional space, we nee.... Read More

How to implement Iterator and Iterable Interface in Java

By Siddharth Raja

In this tutorial, we will learn about iterator and iterable interfaces in Java along with example programs. Java iterator is available since Java 1.2 collection framework. Whereas .... Read More

Union of set of Tuples in Python

By Siddharth Raja

In this tutorial, we will see how to find the union of sets of tuples in python. Let us start with the definition of the union in set theory. The union of sets is the set of every .... Read More

Find the first repeated character in a string in Java

By Siddharth Raja

In this tutorial, we are going to write a program to find the first repeated character in a string in Java. In this problem, we need to find the first character that is repeated an.... Read More

How we can insert a string into another string in Java

By Siddharth Raja

In this tutorial, we will see a program to insert a string into another string in Java. Consider the user enters two strings and an index value, we need to insert the second string.... Read More

Find Minimum edges to reverse to make path from a source to a destination in C++

By Siddharth Raja

In this tutorial, we will see how to make a path from source to destination of a graph by reversing the minimum number of edges. Consider a directed graph G with source node as 0(z.... Read More

return vs exit() in main() in C++ with examples

By Siddharth Raja

In this tutorial, we will see the difference between using exit() and return inside the main() function. In C++ return is a keyword that returns the flow of execution to the callin.... Read More

Console readPassword() in Java with examples

By Siddharth Raja

In this tutorial, we will see the use of readPassword() method in Java along with examples. The readPassword() method belongs to the Console class in Java. It allows the user to ty.... Read More