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.
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.
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.
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.
The repository is organized as follows: n
- solutions/
- Challenge1.java
- Challenge2.py
- Challenge3.cpp
- tests/
- Challenge1Test.java
- Challenge2Test.py
- Challenge3Test.cpp
Clone the repository to your local machine:
git clone https://github.com/ADVindiancoder/algorithm-ii-leetcode.git