Skip to content

Princy-y/Competitive-Programming

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

LeetCode Solutions

This repository contains my solutions to LeetCode problems, organized by difficulty and language. Each solution includes the problem description, approach, and performance details.

Solutions

Easy

26. Remove Duplicates from Sorted Array

  • Language: C++
  • File: Easy/removeDuplicates.cpp
  • Problem: LeetCode #26
  • Description: Given a sorted array, remove duplicates in-place and return the length of the new array.
  • Approach: Used two pointers (i for the last unique element, j to scan). If nums[i] != nums[j], place nums[j] at nums[i+1] and increment i.
  • Performance: 100% beats (faster than 100% of C++ submissions), O(n) time, O(1) space.

Notes

  • Solutions are added daily.
  • Each solution is optimized for runtime and space complexity.
  • Feedback welcome! Connect with me on X.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages