Articles for author: Abhinav Kaushik

What is the Structure or Format of Data Called?

The structure or format of data is called the Syntax, which is defined by various combinations of pre-defined symbols in a programming language. What is Syntax? A Syntax in a programming language is the set of rules that defines a particular language, by defining the correct arrangements of the symbols which are pre-defined in a particular language eg: “;” , “->” , ...

Complete Roadmap To Learn DSA

Data Structures and Algorithms is the most important subject in the world of Software and Computer Science. Data Structures and Algorithms are the base of every application which is built using coding, it can be a web application or a mobile application. It is used to solve any problem most efficiently. The **utilization of time and space ** ...

Remove Duplicates from String

Problem Statement Given a string, we have to remove duplicate characters from the string such that each character appears only once (all the characters in the string should become unique). We can print the resultant string in any order. Example Input : “aaabbccd”Output : “abcd” Explanation As we can see the frequency of all the ...

Remove Duplicates from Array

Problem Statement Given an array of integers, we have to remove duplicates from array such that each element in the array appears only once (all the values in the array should become unique). Example Input : [1,2,2,3,4,4,4,5,5] Output : [1,2,3,4,5] Explanation As we can see the frequency of all the elements Element Frequency 1 1 2 2 3 1 ...

Maximum Subarray Sum

Problem Statement We are given an array A of size N which consists of both positive and negative integers. We have to write a program to find the Maximum Sum of Subarray. Note: A subarray is a contiguous part of an Array. Example Input: [2,-3,6,-5,4,2] Output: 7 Explanation: The subarray [6,-5,4,2] is the max sum ...

N/3 Repeat Number

Given an array of integers of size n, we have to find out if any integer occurs more than n/3 times in the array in linear time and constant extra space. If we find an element then print the element else print -1. Scope This article tells about Moore’s Voting Algorithm In this article we ...

Graph Traversal in Data Structure

A graph, a non-linear data structure represented by vertices (nodes) and edges, is defined as an ordered set (V, E) where V represents the set of vertices and E represents the set of edges connecting these vertices. Every pair of vertices is connected by one edge. Graph traversal, a fundamental operation in graph theory and ...