Git Product home page Git Product logo

leetcode's Introduction

Top Langs

Benhao's github stats

leetcode's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

leetcode's Issues

897 pre.left = null 造成的树存在循环问题

代码

class Solution {
    TreeNode head = new TreeNode(-1);
    TreeNode pre = head;
    public TreeNode increasingBST(TreeNode root) {
        inorder(root);
        return head.right;
    }
    public void inorder(TreeNode node) {
        if (node == null) {
            return;
        }
        inorder(node.left);
        pre.left = null;
        pre.right = node;
        pre = node;
        inorder(node.right);
    }
}

报错:
Error - Found cycle in the TreeNode
解释图:
IMG_86200B317C6D-1

Improve solution code

Automatically complete solve function based on question type?
better handling of user code with comments?

1656 golang

golang 1656 test not pass, because:

        	Error:      	Not equal: 
        	            	expected: []interface {}{interface {}(nil), []interface {}{}, []interface {}{"aaaaa"}, []interface {}{"bbbbb", "ccccc"}, []interface {}{}, []interface {}{"ddddd", "eeeee"}}
        	            	actual  : []interface {}{interface {}(nil), []string(nil), []string{"aaaaa"}, []string{"bbbbb", "ccccc"}, []string(nil), []string{"ddddd", "eeeee"}}
  

Also:

  • Support fetch golang problems in get_problems.py script
  • Support golang linked list
  • Support golang tree
  • Support golang object
  • Support Special Node (linked list or tree) struct
  • Any Other?
  • Support Golang list of linked list input output?
  • Support Golang list of tree input output?

Originally posted by @QuBenhao in #22 (comment)

C

Language C basic support

other golang

Implement and Handle special cases:

  • Tree list
  • Linked list
  • Multi object
  • ...

Java

Java basic support

issue LeetCode 382

Problem like 382 has class Solution being init, fix this in process problem?

# Definition for singly-linked list.
# class ListNode:
#     def __init__(self, val=0, next=None):
#         self.val = val
#         self.next = next
class Solution:

    def __init__(self, head: Optional[ListNode]):


    def getRandom(self) -> int:



# Your Solution object will be instantiated and called as such:
# obj = Solution(head)
# param_1 = obj.getRandom()

Enhanced features

  • Check if not push code today, check leetcode submissions and if exists, auto commit code to github
  • Check if the user has any activities, todo list problems daily. This needs user cookie token?

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.