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
Hackerrank: Winning Lottery Ticket

Problem statement The SuperBowl Lottery is about to commence, and there are several lottery tickets being sold, and each ticket is identified with a ticket ID. In one of the many winning scenarios in the Superbowl lottery, a winning pair of tickets is: Concatenation of the two ticket IDs in the pair, in any order, contains each digit from 0 to 9 at least once. For example, if there are 2 distinct tickets with ticket ID 129300455 and 56789, (129300455, 56789) is a winning pair.

Monday, March 11, 2024 | 6 minutes Read
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
Hackerrank: Balanced Brackets

Problem statement A bracket is considered to be any one of the following characters: (, ), {, }, [, or ]. Two brackets are considered to be a matched pair if the an opening bracket (i.e., (, [, or {) occurs to the left of a closing bracket (i.e., ), ], or }) of the exact same type. There are three types of matched pairs of brackets: [], {}, and ().

Sunday, February 18, 2024 | 6 minutes Read
Hero Image
Hackerrank: Queen's Attack II

Problem statement You will be given a square chess board with one queen and a number of obstacles placed on it. Determine how many squares the queen can attack. A queen is standing on an n×nn \times nn×n chessboard. The chess board’s rows are numbered from 111 to nnn, going from bottom to top. Its columns are numbered from 111 to nnn, going from left to right. Each square is referenced by a tuple, (r,c)(r, c)(r,c), describing the row, rrr, and column, ccc, where the square is located.

Thursday, November 2, 2023 | 9 minutes Read
Hero Image
Eolymp 325: Dangerous route

Problem statement In one country there are n cities, some of which are connected by two-way routes. Cities are numbered by integers from 1 to n. In times of financial crisis the level of the crime in a state rose and the crime groups are organized. The most dangerous of these was “Timur and his gang” led by a notorious criminal circles by Timur, that commit robberies on most of the roads. As a result, some roads became dangerous to drive.

Wednesday, October 11, 2023 | 6 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