SlideShare une entreprise Scribd logo
1  sur  8
How to write a beautiful
code.

TARUN GOYAL
SOFTWARE ENGINEER
WALMARTLABS
Alien Spiral
Given size N output an N*N matrix where numbers
are arranged in a spiral.
Pattern:
1
2
3
4
5
6
7
8
28

29

30

31

32

33

34

9

27

48

49

50

51

52

35

10

26

47

60

61

62

53

36

11

25

46

59

64

63

54

37

12

24

45

58

57

56

55

38

13

23

44

43

42

41

40

39

14

22

21

20

19

18

17

16

15

Link: http://www.codechef.com/INSOM1/problems/INSOMA1
Puzzles and Programming
 Both have constraints.
 Have to devise a logic to solve them.
 Puzzles on paper, coding on computer.
 Solving puzzles can’t get you a job but coding can.
Learning Algorithms
Books:
 Algorithms by Sanjoy Dasgupta (link)
 Introduction to Algorithms 3 Edition (link)
Websites
Practice sites:
 Codechef: http://www.codechef.com
 Spoj: https://www.spoj.com
 Codeforces: http://codeforces.com
 Topcoder: http://www.topcoder.com
Practice and hiring challenges
 HackerEarth: http://www.hackerearth.com
Use Inbuilt Data Structures
 Standard template library in C++:

http://www.cplusplus.com/reference/stl/
 Collections in java:

http://docs.oracle.com/javase/7/docs/technotes/gui
des/collections/
 Example: sort (a,a+n) in c++ will sort an entire array

of numbers.
Sample Problems
http://www.hackerearth.com/problem/algorithm/fin
ding-pairs-4/
http://www.hackerearth.com/problem/algorithm/ch
ocolates-boxes-1/
http://www.hackerearth.com/problem/algorithm/sav
e-girlfriend/
Thank You !

Contenu connexe

Similaire à Presentation

Just Mouse Jack Init
Just Mouse Jack InitJust Mouse Jack Init
Just Mouse Jack Initantitree
 
CSE031.Lecture_07-FlowCharts_Pseudocode .Part_II.pdf
CSE031.Lecture_07-FlowCharts_Pseudocode .Part_II.pdfCSE031.Lecture_07-FlowCharts_Pseudocode .Part_II.pdf
CSE031.Lecture_07-FlowCharts_Pseudocode .Part_II.pdfNourhanTarek23
 
GDG-Start your Programing Career.pptx
GDG-Start your Programing Career.pptxGDG-Start your Programing Career.pptx
GDG-Start your Programing Career.pptxMohamed Essam
 
Autocad second level tutorial
Autocad second level tutorialAutocad second level tutorial
Autocad second level tutorialJo Padilha
 
Blaz_Remskar_1998-2012
Blaz_Remskar_1998-2012Blaz_Remskar_1998-2012
Blaz_Remskar_1998-2012Blaž Remškar
 
Skillsusa university (1)
Skillsusa university (1)Skillsusa university (1)
Skillsusa university (1)Timer Ut
 
ICT-CSS_Q1W7M7_Learning-Materials_6 (1).pptx
ICT-CSS_Q1W7M7_Learning-Materials_6 (1).pptxICT-CSS_Q1W7M7_Learning-Materials_6 (1).pptx
ICT-CSS_Q1W7M7_Learning-Materials_6 (1).pptxJeffreyCollantes
 
arduino
arduinoarduino
arduinomurbz
 
NSTA 2013 Denver - ArduBlock and Arduino
NSTA 2013 Denver - ArduBlock and ArduinoNSTA 2013 Denver - ArduBlock and Arduino
NSTA 2013 Denver - ArduBlock and ArduinoBrian Huang
 
Algorithm n problem solving x
Algorithm n problem solving xAlgorithm n problem solving x
Algorithm n problem solving xlaraibali21
 
IEEE College of Technology MAES SE 2020 - Coding Fun
IEEE College of Technology MAES SE 2020 - Coding FunIEEE College of Technology MAES SE 2020 - Coding Fun
IEEE College of Technology MAES SE 2020 - Coding FunMadelenReyes
 
Rock ,Paper, Scissors IAI .pptx
Rock ,Paper, Scissors IAI .pptxRock ,Paper, Scissors IAI .pptx
Rock ,Paper, Scissors IAI .pptxHome
 
An introduction to coding
An introduction to codingAn introduction to coding
An introduction to codingiain bruce
 
Micromouse
MicromouseMicromouse
Micromousebutest
 
Exploring-javafx-3d
Exploring-javafx-3dExploring-javafx-3d
Exploring-javafx-3dJay Thakkar
 

Similaire à Presentation (20)

Scratch coding and NGSS
Scratch coding and NGSSScratch coding and NGSS
Scratch coding and NGSS
 
Just Mouse Jack Init
Just Mouse Jack InitJust Mouse Jack Init
Just Mouse Jack Init
 
CSE031.Lecture_07-FlowCharts_Pseudocode .Part_II.pdf
CSE031.Lecture_07-FlowCharts_Pseudocode .Part_II.pdfCSE031.Lecture_07-FlowCharts_Pseudocode .Part_II.pdf
CSE031.Lecture_07-FlowCharts_Pseudocode .Part_II.pdf
 
scratch-3-tutorial.pdf
scratch-3-tutorial.pdfscratch-3-tutorial.pdf
scratch-3-tutorial.pdf
 
978 1-58503-717-9-3
978 1-58503-717-9-3978 1-58503-717-9-3
978 1-58503-717-9-3
 
GDG-Start your Programing Career.pptx
GDG-Start your Programing Career.pptxGDG-Start your Programing Career.pptx
GDG-Start your Programing Career.pptx
 
Autocad second level tutorial
Autocad second level tutorialAutocad second level tutorial
Autocad second level tutorial
 
Blaz_Remskar_1998-2012
Blaz_Remskar_1998-2012Blaz_Remskar_1998-2012
Blaz_Remskar_1998-2012
 
Skillsusa university (1)
Skillsusa university (1)Skillsusa university (1)
Skillsusa university (1)
 
Auto cad 3d tutorial
Auto cad 3d tutorialAuto cad 3d tutorial
Auto cad 3d tutorial
 
ICT-CSS_Q1W7M7_Learning-Materials_6 (1).pptx
ICT-CSS_Q1W7M7_Learning-Materials_6 (1).pptxICT-CSS_Q1W7M7_Learning-Materials_6 (1).pptx
ICT-CSS_Q1W7M7_Learning-Materials_6 (1).pptx
 
arduino
arduinoarduino
arduino
 
NSTA 2013 Denver - ArduBlock and Arduino
NSTA 2013 Denver - ArduBlock and ArduinoNSTA 2013 Denver - ArduBlock and Arduino
NSTA 2013 Denver - ArduBlock and Arduino
 
Algorithm n problem solving x
Algorithm n problem solving xAlgorithm n problem solving x
Algorithm n problem solving x
 
IEEE College of Technology MAES SE 2020 - Coding Fun
IEEE College of Technology MAES SE 2020 - Coding FunIEEE College of Technology MAES SE 2020 - Coding Fun
IEEE College of Technology MAES SE 2020 - Coding Fun
 
Rock ,Paper, Scissors IAI .pptx
Rock ,Paper, Scissors IAI .pptxRock ,Paper, Scissors IAI .pptx
Rock ,Paper, Scissors IAI .pptx
 
An introduction to coding
An introduction to codingAn introduction to coding
An introduction to coding
 
Micromouse
MicromouseMicromouse
Micromouse
 
ppt 3 demo.pptx
ppt 3 demo.pptxppt 3 demo.pptx
ppt 3 demo.pptx
 
Exploring-javafx-3d
Exploring-javafx-3dExploring-javafx-3d
Exploring-javafx-3d
 

Dernier

DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 

Dernier (20)

DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 

Presentation