Skip to content

DSA

Algorithms, Data Structures, Competitive Coding, and problems from LeetCode with complete Solution Approach, Pseudocode, and Explanation.

Template Functions in C++

Template Functions in C++

Template Functions in C++ are easy to implement and powerful at the same time, also known as Generic Programming, where we don’t specify the data type and can use any type when needed. The template function follows the concept of data type as a parameter for initializing variables at compile… Read More »Template Functions in C++

Program to Validate Username

Program to Validate Username

Today’s problem, write a program to validate username, similar to the Instagram username validation program, I came up with a simple solution in C++. The problem is very simple, we just need to take care of the rules and limits stated below. Conditions and Rules for Username Can contain Numbers… Read More »Program to Validate Username

Missing Number in Array LeetCode

Find Missing Number in Array LeetCode

Missing Number LeetCode, from the given array we have to find the missing numbers and we were asked to solve this with O(1) extra space complexity i.e constant space and O(n) runtime complexity. This means that we should not use extra space, it should be constant.