Placement oriented data structures

17
PRESENTED BY Dr.S.Lovelyn Rose PLACEMENT ORIENTED DATA STRUCTURES

description

How to prepare for an interview in data structures?

Transcript of Placement oriented data structures

Page 1: Placement oriented data structures

PRESENTED BYDr.S.Lovelyn Rose

PLACEMENT ORIENTED DATA STRUCTURES

Page 2: Placement oriented data structures

World without Data Structure

• Difficult to retrieve needed item

Page 4: Placement oriented data structures

The same holds for an algorithm when the data are not stored in an efficient format appropriate to the application.

All algorithms primarily deal with data and the way the data is organized affects the performance of the algorithm.

Why are most of the interview questions in Data Structures?

Page 5: Placement oriented data structures

Data structures refer to the particular way in which data is stored and organized and the allowed operations on the data

The efficiency of an algorithm depends on the data structure used.

What is Data Structures?

Page 6: Placement oriented data structures

BasicsRemember you cannot jump to problems

without basics so make sure you study the books first.

Books like Yashwant Kanetkar - CodingLipschutz Seymour – BasicsAnany Levitin – Analysis of AlgorithmsCormen, Leiserson, Rivest – Inside out

Preparation

Page 7: Placement oriented data structures

Stack Queue Array Linked list Tree

Binary tree Binary search tree Trie

Graph Hash table Sorting Techniques

Basics

Page 8: Placement oriented data structures

Linked List / TreesInsertionDeletion Traversal

GraphDFSBFS

Algorithms

Page 9: Placement oriented data structures

Basic insertion, deletion algorithmsWith real interview problemsResources

http://www.geeksforgeeks.org/http://www.careercup.com/

Practice, Practice and Practice

Page 10: Placement oriented data structures

Question Known Twist on known problem unknown

Nature Easy Tough

Easy Knowledge Intelligence Easy for everyone? – Optimization matters

Tough don’t panic - Can struggle on a question talk loud

Walk through

Page 11: Placement oriented data structures

Understand problemAsk questionsResolve ambiguity – Eg. reverse a listAlgorithm or code - based on company

linked list - singly or doubly linked list – array or linked listTree - Binary or binary search treeVerbal communication – clear and conciseAll interviewed make mistakes – good ones – rectify

Walk through (contd…)

Page 12: Placement oriented data structures

Optimization Time and spaceRecursion?

Test casesBoundary conditionInput error Normal case

Factors to Consider

Page 13: Placement oriented data structures

Highlight in resumeI am smartI can code

Independent projects not part of curriculumShows your interest in studies

Resume

Page 14: Placement oriented data structures

Learning PhaseIn paperIn computerFind bugsRemember practiceRectify

Language to code – C, C++, JavaIf first pseudocode – make sure u also write

code

Coding

Page 15: Placement oriented data structures

1. Proper indentation2. Proper visibility (public / private)3. Modular programming4. Usage of object oriented concepts5. Proper comments before each function 6. Proper and appropriate naming of functions and

variables7. Proper passing of parameters and not using

global variables

Coding

Page 16: Placement oriented data structures

Try with examples – get logicSeen a similar problem – convert to itMathematical induction

Try for small problems and solve for the bigger problem

Data structures?– Choose appropriate to your application

Approaches

Page 17: Placement oriented data structures

Source

• careercup• Feedback from students