Coder Social home page Coder Social logo

alpha037 / data-structures-and-algorithms Goto Github PK

View Code? Open in Web Editor NEW
336.0 3.0 188.0 912 KB

Important data structures and algorithms implemented in Java along with solutions to AlgoExpert problems and some Leetcode problems.

License: MIT License

Java 100.00%
algorithms algorithm algorithms-and-data-structures algorithms-implemented leetcode leetcode-solutions leetcode-java java java-11 google-java-format

data-structures-and-algorithms's Issues

Cracking the Coding Interview

A folder containing the solutions to the data structures and algorithms problems in Cracking the Coding Interview. I think it may be useful for people testing their solutions. Since there are many approaches they can just copy/paste the solutions here and compare their code's behavior. Or, they can just reference solutions from here for better accessability (desk can get cramped with such a large book).
I am currently working my way through the book and can upload solutions as I go.

Algoexpert problem statements

You have added solutions to algoexpert problems but you haven't added any questions. could you please add them? I couldn't find questions anywhere. Questions refer to problem statement of questions.

Nodedepth problem solution is wrong in this project

NodeDepths problem in algoexpertsolution
ques: Need to find the depth of the tree.
below is the solution

int nodeDepth(TreeNode t, int ldepth, int rdepth) {

	if (t == null) {
		return 0;
	} else {

		ldepth = nodeDepth(t.left, ldepth, rdepth) + 1;

		rdepth = nodeDepth(t.right, ldepth, rdepth) + 1;

		if (ldepth > rdepth) {
			return ldepth;
		} else {
			return rdepth;
		}
	}
}

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.