Skip to content

surajr/CodingInterview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Coding Interview

I just started adding problems. Stay tuned for 10 days to get more problems. 07/31 - I'm back. I'll start working on this from now.

Why you should follow this repository?

As a student I solved many leetcode problems but unable to identify the most efficient solution and this repo will help you with explanation.

Often careercup contains buggy code and most inefficient algorithms. I try to add an effcient one with explanation in my own words.

Feel free to add issues, comment and pull request.

Algorithms

Bit Manipulation

Website Title Solution Time Space Difficulty Note
Careercup Permutation Casewise Java | Python O(2^n) O(1) Medium
Leetcode 461. Hamming Distance Java | Python O(n) O(1) Easy

Arrays

Website Title Solution Time Space Difficulty Note
Leetcode 605. Can Place Flowers Java | Python O(n) O(1) Easy
Leetcode 643. Maximum Average Subarray I Java | Python O(n) O(1) Easy
Leetcode 628. Maximum Product of Three Numbers Java | Python O(n) O(1) Easy
Leetcode 605. Can Place Flowers Java | Python O(n) O(1) Easy
Leetcode 611. Valid Triangle Number Java | Python O(n) O(1) Easy
Leetcode 561. Array Partition I Java | Python O(nlogn) O(1) Easy

Strings

Website Title Solution Time Space Difficulty Note
Leetcode 557. Reverse Words in a String III Java | Python O(n) O(1) Easy
Leetcode 387. First Unique Character in a String Java | Python O(n) O(n) Easy
Leetcode 647. Palindromic Substrings Java | Python O(n^2) O(1) Easy
Leetcode 500. Keyboard Row Java | Python O(n) O(1) Easy
Leetcode [293. Flip Game](https://leetcode.com/problems/flip-game/description/ Java | Python O(n) O(1) Easy

HashMap

Website Title Solution Time Space Difficulty Note
Leetcode 1. Two Sum Java | Python O(n) O(n) Easy
Leetcode 359. Logger Rate Limiter Java | Python O(n) O(n) Easy
Leetcode 535. Encode and Decode TinyURL Java | Python O(n) O(1) Medium
Leetcode 266. Palindrome Permutation Java | Python O(n) O(1) Easy

Trees

Website Title Solution Time Space Difficulty Note
Leetcode 653. Two Sum IV - Input is a BST Java | Python O(n) O(n) Easy
Leetcode 617. Merge Two Binary Trees Java | Python O(mn) O(1) Easy
Leetcode 637. Average of Levels in Binary Tree Java | Python O(n) O(1) Easy

Dynamic Programming

Website Title Solution Time Space Difficulty Note
Leetcode 53. Maximum Sum Subarray Java | Python O(n) O(1) Easy
Leetcode 152. Maximum Product Subarray Java | Python O(n) O(1) Medium
Leetcode 628. Maximum Product of Three Numbers Java | Python O(n) O(1) Easy
Leetcode 62. Unique Paths Java | Python O(m*n) O(m+n) Easy

Recursion

Website Title Solution Time Space Difficulty Note
Leetcode 654. Maximum Binary Tree Java | Python O(n log n) O(n) Easy

Recursion

Website Title Solution Time Space Difficulty Note
Leetcode 339. Nested List Weight Sum Java | Python O( ) O( ) Easy

Releases

No releases published

Packages

 
 
 

Contributors

Languages