Skip to content

Liseon01/LeetCode1-60

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode Solutions Repository

This repository contains solutions for various LeetCode problems written in C++. Each file corresponds to a specific problem and is named following the format leetcode_<problem_number>.cpp. Below is the list of problems solved in this repository:

Problems Solved

  1. Two Sum (leetcode_1.cpp)
    The classic problem of finding two numbers in an array that add up to a specific target.

  2. Add Two Numbers (leetcode_2.cpp)
    Solving addition of two numbers represented as linked lists.

  3. Longest Substring Without Repeating Characters (leetcode_3.cpp)
    Find the length of the longest substring with unique characters.

  4. Median of Two Sorted Arrays (leetcode_4.cpp)
    A challenging problem involving finding the median of two sorted arrays.

  5. Longest Palindromic Substring (leetcode_5.cpp)
    Determine the longest substring that is a palindrome.

  6. Zigzag Conversion (leetcode_6.cpp)
    Reformat a string in a zigzag pattern for given rows.

  7. Reverse Integer (leetcode_7.cpp)
    Reverse the digits of an integer while considering integer overflow.

  8. String to Integer (atoi) (leetcode_8.cpp)
    Implement the atoi function that converts a string to an integer.

  9. Palindrome Number (leetcode_9.cpp)
    Check if a given integer is a palindrome.

  10. Regular Expression Matching (leetcode_10.cpp)
    Solve pattern matching using regular expressions. (Needs review; revisit)

Notes

  • The solutions aim to be clear and efficient, using optimal algorithms and data structures where possible.
  • The Regular Expression Matching problem is flagged as "watch it again," indicating it may require further review or study.

How to Run

To compile and run a specific solution:

g++ -std=c++17 -o solution leetcode_<problem_number>.cpp
./solution

Replace <problem_number> with the desired problem number (e.g., 1, 2, etc.).

Contributions

Feel free to fork this repository, test the solutions, or suggest improvements via pull requests.

About

Coding Test Practice

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages