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

Lexicographical smallest alternate Array

Given two arrays of element between 0 to N- 1 of length N. Find the lexicographically smallest array c such that for any index i  c[i] = ( a[i] + b[i])%N. To find the lexicographically smallest array we can rearrange the elements of the second array. Example: Input: a[]: {0, 1, 2, 3} b[]: {3, 1, 0, 2} Output:… Read More »

Advantages and Disadvantages of Divide and Conquer technique

Prerequisite – What is Algorithm | Introduction to Algorithms Advantages of Divide and Conquer Solving difficult problems: Divide and conquer is an efficient method for solving difficult problems. For example, consider the Tower of Hanoi problem which reduces the degree of difficulty since it divides the problem into subproblems that are easily solvable, solving the trivial cases and… Read More »

C Comments

Prerequisite – C Language Introduction C comments explain code and improve readability. These do not affect program execution. You can use comments in C to clarify code and describe algorithms. There are two types of comments in C: single-line (//) commnets and multi-line (/* */) comments. 1. Single-line comments start with “//” and end at the end of the… Read More »

C Programming Language Standard

Prerequisite – C Language Introduction The C programming language has various versions: C89/C90, C99, C11, and C18. C89/C90: Released in 1989/1990. It introduced key language features. C99: This brought new features like variable-length arrays and complex numbers. C11: This added _Generic, static_assert, and library updates. C18: It is latest standard, with clarifications and updates. Advantages: 1. Efficiency: C… Read More »

Features of C Programming Language

Prerequisite – C Language Introduction C is a simple language made in 1972 by Dennis Ritchie. It’s for system programming. C has low-level memory access, basic keywords, good for systems like OS. Important C language features are: Procedure, Speed, Modularity, Static Type, General Use, Operators, Libraries, Mid-Level, Portability, Extensibility. Procedure means step-by-step instructions. C is one way, others… Read More »

What is Recusion

Recursion is a powerful way of developing algorithms in which the solution of a problem is determined by the solution of one or more identical subproblems. A recursive solution involves two parts: at least one BASE CASE in which the solution returned is not dependent on any solution of any subproblem, and at least one RECURSIVE CASE, where… Read More »