Git Product home page Git Product logo

leetcode's Introduction

Python Leetcode Tasks

All of the ones I have attempted/completed

1-Easy

  • isSumEqual.py
  • backspaceCompare.py
  • intersection_II.py
  • isPalindrome.py
  • increasingBST.py
  • PalindromeLinkedList.py
  • maxDepth.py
  • countNegatives.py
  • isBalanced.py
  • checkSortRotate.py
  • lengthLastWord.py
  • arrayPairSum.py
  • runningSum.py
  • removeDuplicates.py
  • intersection.py
  • vowelReverse.py
  • diStringMatch.py

2-Medium

  • findOrder.py
  • minOperations.py
  • nonDecreasingArray.py
  • maxAncestorDiff.py
  • checkInclusion.py
  • uglyNumber.py
  • matrixScore.py
  • courseSchedule.py
  • numRescueBoats.py
  • alphabetBoardPath.py
  • mergeIntervals.py
  • leastUniqueInts.py
  • maxProfitAssigned.py
  • isValid.py
  • maximumUniqueSubarray.py
  • biggestMountain.py
  • minSetSize.py
  • checkPow3.py
  • spiralMatrix.py
  • maxDistance.py
  • maxAverageSum.py
  • pushDominoes.py
  • countBattleships.py
  • displayTable.py
  • findCenter.py
  • LinkedListBinaryTree.py
  • canReach.py
  • maxProfit.py
  • minimumLength.py
  • hasAllCodes.py
  • kthGrammar.py
  • numsSameConsecDiff.py
  • maxEvents.py
  • 01Matrix.py
  • CoinChange.py
  • findLongestWord.py
  • isValidBST.py
  • addTwoNumbers.py
  • Notes.md
  • maxProductTree.py
  • rotateBox.py
  • newInterval.py
  • kFreqElements.py
  • LongestBeautifulSubString.py
  • numOfSubarrays.py
  • minFallingPathSum.py
  • characterReplacement.py
  • removeNthNodeFromEnd.py
  • DiceTargetSum.py
  • countVowelString.py

3-Hard

  • uniquePathsIII.py
  • minDistance.py
  • RussianDolls.py
  • mergeKlists.py
  • MaxRequests.py
  • orderlyQueue.py
  • RangeModule.py
  • getCoprimes.py
  • maxPathSum.py
  • isPossible.py

Notes

2/6/21 2-Medium/minSetSize.py

One of the weirdest things I've noticed has been dot references outperforming non-dot references. This also includes var = var2 = val notation; typically it has been though that these should yield better performance. This has led me to the conclusion that while non-dots outperform dot references - in a localised system using multiple imports - it makes it easier to recognise which one your are referencing to.

This was highlighted after using minSetSize and noticed the ~200ms difference between dot and non-dot references in favour of dot references.

counter = collections.Counter > counter=Counter

A second note I noticed from the exercise,

list.sort() outperforms list=sorted(list)

9/6/21 3-Hard/mergeKLists.py

I would have liked to implemented a merge sort, as I feel that is what was desired by the question and it feels the most optimal, although it can taken into dispute that it is not better than the current O(n) solution I have implemented as it performs 3 O(n) operations

./update_README.py

Needs a redo

leetcode's People

Contributors

sma-das avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.