Skip to content

This repo solves various LeetCode problems on Algorithm II. It covers topics like DP, graphs, divide and conquer, etc. All solutions are in Python with detailed explanations. Use and modify the code for your own practice. Report issues or suggest improvements via PRs or issues. Happy coding!

Notifications You must be signed in to change notification settings

Vinaykumarmahato/Algorithm-II-LeetCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Algorithm-II-LeetCode do here

This repository contains my solutions to the Algorithm II challenges on LeetCode. Each challenge provides a problem statement and the goal is to implement the solution using the concepts and techniques related to algorithms.

Challenge Descriptions

Challenge 1: Two Sum

Problem Statement: Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.

Solution: Implemented a hash table approach to store the complement of each number in the array and check if it exists in the hash table.

Challenge 2: Add Two Numbers

Problem Statement: You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order, and each of their nodes contains a single digit. Add the two numbers and return the sum as a linked list.

Solution: Implemented a recursive approach to add each digit of the two linked lists and carry over any excess to the next digit.

Challenge 3: Longest Substring Without Repeating Characters

Problem Statement: Given a string s, find the length of the longest substring without repeating characters.

Solution: Implemented a sliding window approach to keep track of the longest substring without repeating characters.

Repository Structure

The repository is organized as follows: n

  • solutions/
    • Challenge1.java
    • Challenge2.py
    • Challenge3.cpp
  • tests/
    • Challenge1Test.java
    • Challenge2Test.py
    • Challenge3Test.cpp

Usage

Clone the repository to your local machine:

git clone https://github.com/ADVindiancoder/algorithm-ii-leetcode.git

Algorithm Icon Algorithm Icon Algorithm Icon Algorithm Icon Algorithm Icon Algorithm Icon Algorithm Icon Algorithm Icon Algorithm Icon Algorithm Icon Algorithm Icon

About

This repo solves various LeetCode problems on Algorithm II. It covers topics like DP, graphs, divide and conquer, etc. All solutions are in Python with detailed explanations. Use and modify the code for your own practice. Report issues or suggest improvements via PRs or issues. Happy coding!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages