Logo Miradil's Blog
  • Home
  • About
  • Skills
  • Experiences
  • Education
  • More
    Projects Publications Recent Posts
  • Posts
  • Dark Theme
    Light Theme Dark Theme System Theme
Logo Inverted Logo
  • Tags
  • Backend
  • Basic
  • Binary Search Tree
  • BinarySearch
  • Bit Manipulation
  • C
  • Caching
  • Codeforces
  • Disjoint Set
  • Django
  • DSA
  • Easy
  • Eolymp
  • File Structure
  • File System
  • ForBeginners
  • Formatted I/O
  • HackerRank
  • HowTo
  • ICPC
  • Interactive
  • Interview
  • Intro
  • Leetcode
  • Library Functions
  • LinkedList
  • Linux
  • Medium
  • Open Source
  • Podcasts
  • Programming
  • Public Speaking
  • Python
  • Roadmap
  • Stack
  • System Calls
  • The Diary of a CEO
  • Tricky
  • Vinh Giang
  • Web Development
Hero Image
Leetcode 142: Linked List Cycle II

NOTE: The problem 141: “Linked List Cycle” is a subproblem of this problem, so the solution can be slightly modified to solve that too. Problem statement Given the head of a linked list, return the node where the cycle begins. If there is no cycle, return null. There is a cycle in a linked list if there is some node in the list that can be reached again by continuously following the next pointer. Internally, pos is used to denote the index of the node that tail’s next pointer is connected to (0-indexed). It is -1 if there is no cycle. Note that pos is not passed as a parameter.

Monday, March 4, 2024 | 4 minutes Read
Hero Image
Leetcode 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. You may assume the two numbers do not contain any leading zero, except the number 0 itself. Example 1 Input: l1 = [2,4,3], l2 = [5,6,4]

Saturday, October 7, 2023 | 3 minutes Read
Navigation
  • About
  • Skills
  • Experiences
  • Education
  • Projects
  • Publications
  • Recent Posts
Contact me:
  • miradil.zeynalli@gmail.com
  • mmzeynalli
  • Miradil Zeynalli
  • @mmzeynalli
  • Miradil Zeynalli
  • @mmzeynalli

Toha Theme Logo Toha
© 2024 Copyright.
Powered by Hugo Logo