Mithlesh Upadhyay

Mithlesh Upadhyay is a Computer Science and AI expert from Madhya Pradesh with strong academic background (BE in CSE and M.Tech in AI) and over six years of experience in technical content development. He has contributed tech articles, led teams, and worked in Full Stack Development and Data Science. He founded the w3colleges.org portal for learning resources.

Author Archives: Mithlesh Upadhyay

Length of largest subarray of Fibonacci Numbers

Given an array arr[] of integer elements, the task is to find the length of the largest sub-array of arr[] such that all the elements of the sub-array are Fibonacci numbers. Examples: Input: arr[] = { 4, 2, 3, 4, 5, 8, 11 } Output: 2 Explanation: Maximum length sub-array with all elements as Fibonacci number is {2,… Read More »

Python Program to Swap String Case Without Using swapcase()

Generally, we use swapcase() to swap strings in Python. What if we are asked to do swapping without using the method. In this article, I will be sharing python program to swap upper case letters to lower case and vice versa in the same string. Examples: Input: “w3ColLeges” Output: “W3cOLlEGES” Input: “W3cOlLegEs OrG” Output: “w3CoLlEgEs oRg” Some  letters… Read More »

Find GCD of two numbers

Given two numbers A and B, the task is to calculate GCD of A and B. Examples: Input : A = 4, B = 6 Output : 2 Input : A = 5, B = 10 Output : 5 GCD (Greatest Common Divisor) of two number is the largest number that divides both of them. A simple solution… Read More »