GithubHelp home page GithubHelp logo

srsandy / data-structures-and-algorithms-in-java-2nd-edition-by-robert-lafore Goto Github PK

View Code? Open in Web Editor NEW
193.0 8.0 165.0 341 KB

Solutions of Data Structures and Algorithms in Java 2nd Edition by Robert Lafore. Adding practice problems and solutions.

Java 100.00%
algorithm java data-structures algorithm-challenges linked-list array stack queues sorting-algorithms recursion

data-structures-and-algorithms-in-java-2nd-edition-by-robert-lafore's Introduction

DSA-in-JAVA

Data Structures and Algorithms in Java

GitHub forks ย  GitHub stars

Solutions of Data Structures & Algorithms in Java 2nd Edition by Robert Lafore Buy here

Other Practice Problems : here

Java Methods that can help you code quicker and better: here (Open for contributions and corrections)

Index

You like it ?

  • Don't forget to Start and Watch the repo

Contributing

Feel free to contribute .. ๐Ÿ˜„

  1. Fork it!
  2. Commit.
  3. Push.
  4. Submit a pull request ๐Ÿ™‚

Requests, Improvements, Issues

If you found a mistake, or want improvemenents are needed feel free to submit a new issue.

data-structures-and-algorithms-in-java-2nd-edition-by-robert-lafore's People

Contributors

aansari4599 avatar ap-jain avatar ayushs1ngh avatar balajig2000 avatar dheerajodha avatar flameangular avatar gane5hvarma avatar greatmerlin avatar hryxna avatar ildar10 avatar ishita-mehta avatar jainsaurav52 avatar lakshay761 avatar monst12 avatar mranjan15 avatar pranshuag9 avatar prashant3360 avatar rad4day avatar ritulmohanty avatar shaurya026 avatar shikhar8434 avatar sidcodestacks avatar simplyrks avatar skpsumankumar avatar srsandy avatar sumeetk321 avatar sumityadav29 avatar tomorth avatar vanshbhasin157 avatar vivekkumarsingh07 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

data-structures-and-algorithms-in-java-2nd-edition-by-robert-lafore's Issues

Combinations: Picking a Team (Java Implementation)

Add java file Chapter-6 folder

Implement a recursive approach to showing all the teams that can be created from a group (n things taken k at a time). Write the recursive showTeams() method and a main() method to prompt the user for the group size and the team size to provide arguments for showTeam(), which then displays all the possible combinations.

Refer pdf book inside the repo Pg no. 306,307, 315(6.5)

Chapter 04: CircularQueue.java

The mentioned file needs to be re-written. There is no concept of overflow in Circular Queue as it wraps up. What I mean is:
Test Driver Code:
public static void main(String[] agrs) {
CircularQueue q = new CircularQueue(5);
q.insert(10);
q.insert(20);
q.insert(30);
q.insert(40);
q.display();
q.insert(50);
q.display();
q.insert(60);
q.insert(70);
q.display();
q.delete();
q.display();

            q.delete();
            q.display();

            q.delete();
            q.display();

            q.delete();
            q.delete();
            q.display();

            q.insert(60);
            q.insert(70);
            q.insert(80);
            q.display();
            q.delete();
            q.display();

    }

Should produce output:
$ java CircularQueue
10 20 30 40
10 20 30 40 50 //First five elements
60 70 30 40 50 //Enqueue of 60 and 70
70 30 40 50 //Dequeue
30 40 50 //Dequeue
40 50
//Two Dequeue
60 70 80 //Enqueue of 60 70 80
70 80 //Dequeue

Solve Java Questions.

Check the repository

You can find the book here

Go to any unsolved chapter solve it's Programming Projects.

Keep .java file in the correct folder and update the ReadMe.md accordingly.

Add a PR ๐Ÿ˜„ and be a contributor to this repository.

Avoid

Collection Classes (Implement everything by your own)

The Knapsack Problem (JAVA implementation)

Add java file Chapter-6 folder

Write a program that solves the knapsack problem for an arbitrary knapsack capacity and series of weights. Assume the weights are stored in an array. Hint: The arguments to the recursive knapsack() function are the target weight and the array index where the remaining items start.

Your Code must follow the algorithm given on page no. 305 of the pdf book which is inside the book.

Add competitive coding problems and solutions in JAVA

Add a PR with any competitive coding problem
In

  • /Practice Problems/ add competitive coding problems and solutions in the respective topic folder

Check other folders in Arrays how it is done in rest of file

E.g

  • Add a folder in Arrays folder with the Name of Problem Title.
  • Inside that folder add the solution ProblemTitle.java and a README.md
  • Make sure the class name is ProblemTitle that is the name of the file.
  • README.md must contain a detail description of the problem with the test cases.

Add competitive coding problems and solutions in JAVA

Add a PR with any competitive coding problem
In

  • /Practice Problems/ add competitive coding problems and solutions in the respective topic folder

Check other folders in Arrays how it is done in rest of file

E.g

  • Add a folder in Arrays folder with the Name of Problem Title.
  • Inside that folder add the solution ProblemTitle.java and a README.md
  • README.md must contain a detail description of the problem.

Bugger in 3.6

It is better to write the if statement as "if(a[in - 1] == temp && a[in - 1] != -1) "
otherwise, it could cause an incorrect result for nCopies.

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.