Interview Questions Answers.ORG
Interviewer And Interviewee Guide
Interviews
Quizzes
Home
Quizzes
Interviews Analysis Interviews:AnalysisAnalystAnalyst IntegrationAnalyst IntegrationAnecdotalBusiness AnalystCompetency BasedCredit AnalystCrime Scene AnalystData AnalystEmotional IntelligenceEvent PlannerExecutive Business AnalysisExecutive Business DevelopmentFemale SecretaryFinancial AnalystGISGIS AnalysisGIS DateMarket Research AnalystPension ExaminerPhone ScreeningPre EmploymentPre Employment ScreeningRecruitment/Research AnalystResearch AnalystResearch OfficerSales AnalystSpatial DataStatic AnalysisStatics MeasuresStatisticsSystem Analysis
Copyright © 2018. All Rights Reserved
Analyst Integration Interview Question:
Can you please explain the difference between iteration and recursion?
Submitted by: AdministratorIteration uses loop to perform same step again and again while recursion calls function itself to do the repetitive task. Many times recursion result in a clear and concise solution of complex problem e.g. tower of Hanoi, reversing a linked list or reversing a String itself. One drawback of recursion is depth, since recursion stores intermediate result in stack you can only go upto certain depth, after that your program will die with StackOverFlowError, this is why iteration is preferred over recursion in production code.
Submitted by:
Submitted by:
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.
https://InterviewQuestionsAnswers.ORG.