Skip to content

okazkayasi/Leetcode-TS-Solutions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode TypeScript Solutions

This is a collection of LeetCode solutions written in TypeScript. This repository contains a variety of coding challenges completed as part of my journey through LeetCode's problem sets. Each solution is crafted to help understand and master different algorithms and data structures.

Solutions

  1. Two Sum

    • Problem Number: 1
    • Description: Given an array of integers, return indices of the two numbers such that they add up to a specific target.
    • Link: Two Sum
  2. Longest Substring Without Repeating Characters

  3. Median of Two Sorted Arrays

  4. Longest Palindromic Substring

  5. Zigzag Conversion

    • Problem Number: 6
    • Description: The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows. Write the code that will take a string and make this conversion given a number of rows.
    • Link: Zigzag Conversion
  6. Reverse Integer

    • Problem Number: 7
    • Description: Given a signed 32-bit integer x, return x with its digits reversed. If reversing x causes the value to go outside the signed 32-bit integer range [-2^31, 2^31 - 1], then return 0.
    • Link: Reverse Integer
  7. Palindrome Number

    • Problem Number: 9
    • Description: Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward.
    • Link: Palindrome Number
  8. Container With Most Water

    • Problem Number: 11
    • Description: Given n non-negative integers a1, a2, ..., an where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with the x-axis forms a container, such that the container contains the most water.
    • Link: Container With Most Water
  9. 3Sum

    • Problem Number: 15
    • Description: Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums[j] + nums[k] == 0.
    • Link: 3Sum
  10. Valid Parentheses

    • Problem Number: 20
    • Description: Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.
    • Link: Valid Parentheses
  11. Find the Index of the First Occurrence in a String

  12. Text Justification

    • Problem Number: 68
    • Description: Given an array of words and a length maxWidth, format the text such that each line has exactly maxWidth characters and is fully (left and right) justified.
    • Link: Text Justification
  13. Valid Palindrome

    • Problem Number: 125
    • Description: Given a string s, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.
    • Link: Valid Palindrome
  14. Reverse Words in a String

  15. Two Sum II - Input Array Is Sorted

    • Problem Number: 167
    • Description: Given a 1-indexed array of integers numbers that is already sorted in non-decreasing order, find two numbers such that they add up to a specific target number.
    • Link: Two Sum II - Input Array Is Sorted
  16. Kth Largest Element in an Array

    • Problem Number: 215
    • Description: Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element.
    • Link: Kth Largest Element in an Array
  17. Is Subsequence

    • Problem Number: 392
    • Description: Given two strings s and t, return true if s is a subsequence of t, or false otherwise.
    • Link: Is Subsequence
  18. Valid Palindrome II

    • Problem Number: 680
    • Description: Given a string s, return true if the s can be a palindrome after deleting at most one character from it.
    • Link: Valid Palindrome II
  19. Unique Length-3 Palindromic Subsequences

  20. Number of Ways to Split Array

    • Problem Number: 2270
    • Description: You are given a 0-indexed integer array nums. You can split the array into two non-empty parts such that the sum of the elements in the left part is less than or equal to the sum of the elements in the right part.
    • Link: Number of Ways to Split Array
  21. Shifting Letters II

    • Problem Number: 2381
    • Description: You are given a string s and a 2D integer array shifts where shifts[i] = [startIndex, endIndex, direction]. You need to perform the shifts on the string s.
    • Link: Shifting Letters II
  22. Count Vowel Strings in Ranges

    • Problem Number: 2559
    • Description: Given an array of strings words and an array of queries, return an array of integers answer where answer[i] is the number of strings in words that are valid according to the query.
    • Link: Count Vowel Strings in Ranges

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published