Open in app

Sign In

Write

Sign In

kelli davis
kelli davis

54 Followers

Home

About

Apr 3, 2020

30 Day Leet Code Challenge #1 Single Number Java Solution

This is my solution to problem 136 from Leetcode.com. Given a non-empty array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runtime complexity. Could you implement it without using extra memory? Example 1: Input: [2,2,1] Output: 1 Example…

Programming

4 min read

30 Day Leet Code Challenge #1 Single Number Java Solution
30 Day Leet Code Challenge #1 Single Number Java Solution
Programming

4 min read


Apr 1, 2020

How to Solve Diagonal Traverse Algorithm in Java

This is my solution to problem 498 on Leet Code. Given a matrix of M x N elements (M rows, N columns), return all elements of the matrix in diagonal order as shown in the below image. Example: Input: [ [ 1, 2, 3 ], [ 4, 5, 6 ], […

Algorithms

9 min read

How to Solve Diagonal Traverse Algorithm in Java
How to Solve Diagonal Traverse Algorithm in Java
Algorithms

9 min read


Feb 25, 2019

How to Solve Plus One Algorithm in Java

This is my solution to problem 66 on Leet Code. Given a non-empty array of digits representing a non-negative integer, plus one to the integer. The digits are stored such that the most significant digit is at the head of the list, and each element in the array contain a…

Programming

4 min read

How to Solve Plus One Algorithm in Java
How to Solve Plus One Algorithm in Java
Programming

4 min read


Feb 24, 2019

How to solve Largest Number At Least Twice of Others Algorithm in Java

This is my solution to problem 747 on Leet Code. In a given integer array nums, there is always exactly one largest element. Find whether the largest element in the array is at least twice as much as every other number in the array. If it is, return the index…

Java

6 min read

How to solve Largest Number At Least Twice of Others Algorithm in Java
How to solve Largest Number At Least Twice of Others Algorithm in Java
Java

6 min read


Feb 13, 2019

How to Solve Pivot Index Algorithm in Java

This is my solution to problem 724 on Leet Code. Given an array of integers nums, write a method that returns the "pivot" index of this array. We define the pivot index as the index where the sum of the numbers to the left of the index is equal to…

Programming

5 min read

How to Solve Pivot Index Algorithm in Java
How to Solve Pivot Index Algorithm in Java
Programming

5 min read

kelli davis

kelli davis

54 Followers

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech