100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.6 TrustPilot
logo-home
Class notes

Data structures and algorithms in Java

Rating
-
Sold
-
Pages
1
Uploaded on
25-02-2023
Written in
2022/2023

In these notes, we discuss Data Structures and Algorithms using Java Programming. The data structure is a way to store and organize data so that it can be used efficiently. It is a set of concepts that we can use in any programming language to structure the data in the memory. Data structures are widely used in almost every aspect of computer science i.e. operating systems, computer science, compiler design, Artificial Intelligence, graphic,s and many more. Some examples of Data structures that we are going to cover in this course are arrays, linked lists, stack, queue, Binary Tree, Binary Search Tree, Graphs, etc. Apart from knowing these data structures, it's also important to understand the algorithmic analysis of a given code. Different Sorting and searching techniques will be talked about with their implementation in java programming. Lastly, this course contains information on the Greedy approach, Dynamic approach, and divide and Conquer approach to programming.

Show more Read less
Institution
Course

Content preview

DSA in Java
1. Data structures and algorithms act as a oil to programming whether it's
any programming language its application from operating system to compiler design
artificial intelligence to computer graphics and mobile app development. Data
structure helps store and organize data efficiently everywhere being an expert in
different data structures like stack queue link lists trees and graphs would help
crack any interview and write an optimized code that can benefit any organization.
made up of two words data and structure so data is nothing but the information that
you want to store in a computer and structure is how you arrange your data in the
computers depending upon these two factors. Data structures are different from how
you store your data when you talk about linked list in areas you have to always
store data in a contiguous memory applications. All the data is arranged in a
sequential manner and every element has two neighbors. There are always predefined
extremes like if you talk about array there will be a starting index and an ending
index. Linked lists come into picture obviously with eddie you have a fixed fixed
fixed right.
2. If you want to add an element in stack you can not remove any of these
elements unless and until you have removed the top. This has restricted how we
insert and delete our elements right this is the restriction that is there so this
is your stack okay now if you talk about queue it works in a different manner.
Nonlinear data structures allow arrangement of data in a non-sequential manner
there can be n neighbors for a single element. They do not have extremes like we
saw in a linear data structure there were extremes. In case of areas you have fixed
size with linked list you have dynamic size with arrays you have you have to store
contiguous movie locations. All of these data structures are non-linear data
structures so what is an array it is a linear data structure that means elements
will be stored in a linear fashion right linear fashion now if you talk about
memory obviously these addresses will be hexadecimal. All elements that are greater
than 10 that means 11 12 13 14 will be on the right hand side and all those that
are less than 10 will be in the left hand side. Then we have graphs, avl trees and
red directories.
3. Can we store this array in your memory in the memory no because it
needs contiguous memory allocation that means when in you have memory or locations
or memory locations available in a one big chunk of 16 bytes. Can we access
elements randomly yes with the help of indexes so if you talk about this array
right one two three and 4 obviously this there will be a name associated with this
array. The data type or the type of data that you can store in this array will be
homogeneous that means you can only store similar elements in the array. the array
now how can you access the first element so error of zero now it was around 100
plus 0 because there are no bytes right. When you talk about an array there will be
a name associated with the array and then the data type are you going to store
integer values in that area. Only one index will be used or one subscript or one
index that we use and then definitely the size of the edit so this is how you
declare your 1d array.
4. Inside this one nd array you have another 1d array right now this is
known as 2d array. If you want to access the element that is present at this
location what you will do you will run two for loops. internally it is treated as
if they are again in a contiguous memory location but this time around you have a
1d. array. The problem statement is that we have to write a program in which we are
going to create one dimensional array. Then we 'll talk about how to create a two
dimensional integer array and how to store number into it. The search and sort
operation that is will be sorting down in ascending order each element of the one-
dimensional and two-dimensional arrays as well as will implement search on the
given array. Java has so many constructs where we can loop around a given code. One
of the construct is your for loop so we 'll be using for loop here. The next
condition in the for loop is stopping condition like till where this i should
iterate over it is starting from zero and where should it end.

Written for

Course

Document information

Uploaded on
February 25, 2023
Number of pages
1
Written in
2022/2023
Type
Class notes
Professor(s)
D.s pawar
Contains
All classes

Subjects

$10.09
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
atharvadere

Get to know the seller

Seller avatar
atharvadere Bharati Vidyapeeth College of Engineering
Follow You need to be logged in order to follow users or courses
Sold
0
Member since
2 year
Number of followers
0
Documents
2
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions