Skip to content

Sharmavicky/Dsa_Array

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📂 DSA Array Problems

This repository contains solutions to common Array problems in Data Structures & Algorithms (DSA).
Each problem is implemented in C++ with multiple approaches — from Brute Force to Optimal — along with time and space complexity analysis.


🚀 Features

  • Multiple approaches (Brute Force, Better, Optimal).
  • Well-commented C++ solutions.
  • Time and Space Complexity mentioned for each solution.
  • Covers common array problem patterns:
    • Searching & Sorting
    • Prefix/Suffix techniques
    • Two pointers
    • Hashing & Frequency maps
    • Sliding Window
    • Mathematical tricks

📘 Example Problems

Here are some of the problems solved in this repo:

  1. Product of Array Except Self

    • Brute Force, Division Method, Prefix & Suffix (Optimal).
  2. Count Pairs with Sum Equal to K

    • Brute Force, Sorting + Two Pointers, Hash Map (Optimal).
  3. Search in Rotated Sorted Array

    • Linear Search, Binary Search (Optimal).
  4. Remove Duplicates from Sorted Array

    • Brute Force, Two-Pointer Technique.

…and more.


🛠️ How to Run

Clone the repository and compile any file using g++:

# Clone repo
git clone https://github.com/<your-username>/DSA_array.git

# Go into repo
cd DSA_array

# Compile a file
g++ problemfile_name.cpp -o output_file

# Run the program
./output

About

This repo contains 'dsa' problems of array.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages