Friday, 8 October 2021

[Recursive] How to Reverse Array or String In Golang | Javascript | Python

In this article we are going to cover up how we can reverse an array or string using recursive function .

Before Writing any code let's explore about what recursion is:

Read more ยป

Labels: , , , , ,

Thursday, 7 October 2021

[Python] How To Find Largest Element In Array Solved

In this article we're about to work on Data structures and algorithm task.
The Task is to find the largest number from a given array, So without wasting anytime let's start

Given an array A[] of size n. The task is to find the largest element in it.

Example 1:
Input:
n = 5
A[] = {10, 5, 3, 54, 65}
Output:
65
Explanation:
The largest element of given array is 90.

Example 2:
Input:
n = 10
A[] = {10, 23, 12, 1, 2, 65, 89, 8, 5, 90}
Output:
90
Explanation:
The largest element of given array is 90.


Now we have Inputs as well to test our code so let's write the code and test both the examples one by one. Code Is Below



Now let's test the code for both examples

Example 1 Output:



Example 2 Output:

Checkout Data structures and Algorithm Books to Enhance Your Skill..

Labels: ,