leetcode solutions

Leetcode Integer to Roman Java Solution

Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. Symbol Value I 1 V 5 X 10 L 50 C 100…

2 years ago

Leetcode Count Complete Tree Nodes Java Solution

Given a complete binary tree, count the number of nodes. Note: Definition of a complete binary tree from Wikipedia:In a complete binary tree…

2 years ago

Leetcode Dungeon Game Java Solution

The demons had captured the princess (P) and imprisoned her in the bottom-right corner of a dungeon. The dungeon consists…

2 years ago

Leetcode 787 Cheapest Flights Within K Stops Java Solution

There are n cities connected by m flights. Each flight starts from city u and arrives at v with a price w. Now…

2 years ago

Leetcode 4 Median of Two Sorted Arrays Java Solution

There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall…

2 years ago

Leetcode 2 Add Two Numbers Java Solution

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 contain…

2 years ago

This website uses cookies.