Add Digits LeetCode Solution
Given an integer num, repeatedly add all its digits until the result has only one digit, and return it.
Add Digits LeetCode Solution Read More »
Leetcode SolutionGiven an integer num, repeatedly add all its digits until the result has only one digit, and return it.
Add Digits LeetCode Solution Read More »
Leetcode SolutionHere, We see Tenth Line LeetCode Solution. This Leetcode problem is done in Bash. List of all LeetCode Solution Tenth Line LeetCode Solution Problem Statement Given a text file file.txt, print just the 10th line of the file. Example: Assume that file.txt has the following content: Line 1 Line 2 Line 3 Line 4 Line 5 Line 6
Tenth Line LeetCode Solution Read More »
Leetcode SolutionGiven an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each input would have exactly one solution, and you may not use the same element twice.
Two Sum LeetCode Solution Read More »
Leetcode SolutionYou 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.
Add Two Numbers LeetCode Solution Read More »
Leetcode SolutionGiven a string s, find the length of the longest substring without repeating characters.
Longest Substring Without Repeating Characters LeetCode Solution Read More »
Leetcode SolutionGiven two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).
Median of Two Sorted Arrays LeetCode Solution Read More »
Leetcode SolutionGiven 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.
3Sum LeetCode Solution Read More »
Leetcode SolutionGiven an array nums of size n, return the majority element. The majority element is the element that appears more than [n / 2] times. You may assume that the majority element always exists in the array.
Majority Element LeetCode Solution Read More »
Leetcode SolutionYou are given an array of k linked-lists lists, each linked-list is sorted in ascending order. Merge all the linked-lists into one sorted linked-list and return it.
Merge k Sorted Lists LeetCode Solution Read More »
Leetcode SolutionGiven n, the number of stones in the heap, return true if you can win the game assuming both you and your friend play optimally, otherwise return false.
Nim Game LeetCode Solution Read More »
Leetcode SolutionThere is a singly-linked list head and we want to delete a node node in it. Delete the given node
Delete Node in a Linked List LeetCode Solution Read More »
Leetcode SolutionGiven the head of a singly linked list, reverse the list, and return the reversed list.
Reverse Linked List LeetCode Solution Read More »
Leetcode SolutionYou are climbing a staircase. It takes n steps to reach the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?
Climbing Stairs LeetCode Solution Read More »
Leetcode Solution