Equal Strings Solution Codechef

June Long Challenge 2022 Solution

Equal Strings Solution Codechef Given a string A of length N consisting of lowercase English alphabet letters. You are allowed to perform the following operation on the string A any number of times: Select a non-empty subsequence S of the array [1,2,3,…,N] and any lowercase English alphabet α; Change Ai​ to α for all i∈S. Find the minimum number of operations required to convert A into a given string B of length N consisting of lowercase English alphabet letters. … Read more

Learn How to Swap Elements in all Possible Way

Swap Elements in all Possible Way What is Swapping? Swap refers to the exchange between two or more things.   But it’s a normal business definition. In programming, Swap refers to exchange the values between two or more variable. Now we know what is swapping, but what is the process of swap? Any idea!? Ok, … Read more

Array Rotations Data Structure Solution

  Array Rotations Program for array rotation An array is an aggregate data structure to store a group of objects of the same or different types.Array can hold primitive as well as references. The array is the most efficient data structure for sorting and accessing a sequence of objects.   In this lesson we will … Read more

How to Program Battle Ship Game

Battle Ship Game Design Pattern I have tried to make a simple game using C++.The name of my game is Battleship game. In this game there is an ocean field which is a square 10 X 10 grid. One of the co-ordinate of the grid is number from 1-10.This program randomly place 10 ship in different location. … Read more