[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-718148-105":59,"doc-detail-718148-en":130,"doc-similar-718148":234},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":123,"head_meta":125,"extra_data":127,"updated_unix":129},105,"en","elements-of-programming-interviews-the-insiders-guide-sampling","Elements of Programming Interviews - The Insiders' Guide - Sampling","","Sampling content from Elements of Programming Interviews (EPI), presenting examples of the book’s organization, writing style, and covered topics. Includes author and publication information, licensing terms, version details, and a comprehensive table of contents spanning interview preparation through programming problem sets. Covers interview skills and strategies, problem-solving patterns, and multiple foundations topics such as primitive types, arrays, strings, linked lists, stacks, queues, trees, heaps, searching, hash tables, and sorting.",{"@graph":69,"@context":122},[70,84,105],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":30,"@type":76,"position":81},"https://docshare.wps.com/document/technology/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/elements-of-programming-interviews-the-insiders-guide-sampling/718148/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/elements-of-programming-interviews-the-insiders-guide-sampling/718148.png","ImageObject",300,407,{"name":92,"@type":93},"WPS_1793603815","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-21","2026-11-16",true,{"@type":102,"interactionType":103,"userInteractionCount":14},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"What is the purpose of this document sample?","Question",{"text":112,"@type":113},"It provides examples showing EPI’s organization, content, style, topics, and overall quality.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"Which sections does the table of contents include?",{"text":117,"@type":113},"It includes an interview-focused section covering getting ready, strategies, conducting interviews, and problem-solving patterns, followed by a problems section with multiple programming topic areas.",{"name":119,"@type":110,"acceptedAnswer":120},"How is the programming interview content organized in the book sample?",{"text":121,"@type":113},"The interview preparation part is structured into numbered subsections, and the problems part is organized by topic chapters with detailed sub-problems.","https://schema.org",{"og:url":83,"og:type":124,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":126,"canonical":83},"index,follow",{"doc_id":128,"site_id":62},718148,1794854118,{"code":4,"msg":5,"data":131},{"doc_id":128,"user_id":132,"nickname":92,"user_avatar":133,"doc_module":4,"category_id":29,"category_name":30,"doc_title":65,"doc_description":67,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":14,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":139,"language":140,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":67,"update_tm":129,"read_time":144,"preview_page_count":46,"preview_urls":145},12232076219891,"https://eur-avatar.wpscdn.com/davatar_994ba38a5ba835b3df7d355c54d3ed8d","Elements  \nof Programming Interviews  \nThe Insiders' Guide  \nAdnan Aziz Tsung-Hsien Lee Amit Prakash  \nThis document is a sampling of our book, Elements of Programming Interviews (EPI). Its purpose is to provide examples of EPI's organization, content, style, topics, and quality.  \nWe'd love to hear from you—we're especially interested in your suggestions as to where the exposition can be improved, as well as any insights into interviewing trends you may have.  \n[You can buy EPI with at](You can buy EPI with at Amazon.com)[ Amazon.com](You can buy EPI with at Amazon.com).  \n[http://ElementsOfProgrammingInterviews.com](http://ElementsOfProgrammingInterviews.com)  \nAdnan Azizis a professor atthe Department of Electrical and Computer Engineering at The University of Texas at Austin, where he conducts research and teaches classes in applied algorithms. He received his Ph.D. from The University of California at Berkeley; his undergraduate degree is from Indian Institutes of Technology Kanpur. He has worked at Google, Qualcomm, IBM, and several software startups. When not designing algorithms, he plays with his children, Laila, Imran, and Omar.  \nTsung-Hsien Lee is a Software Engineer at Google. Previously, he worked as a Software Engineer Intern at Facebook. He received both his M.S. and undergraduate degrees from National Tsing Hua University. He has a passion for designing and implementing algorithms. He likes to apply algorithms to every aspect of his life. He takes special pride in helping to organize Google Code Jam 2014 .  \nAmit Prakash is a co-founder and CTO of ThoughtSpot, a Silicon Valley startup. Previously, he was a Member of the Technical Sta􀀋 at Google, where he worked primarily on machine learning problems that arise in the context of online advertising. Before that he worked at Microsoft in the web search team. He received his Ph.D. from The University of Texas at Austin; his undergraduate degree is from Indian Institutes of Technology Kanpur. When he is not improving business intelligence, he indulges in his passion for puzzles, movies, travel, and adventures with Nidhi and Aanya.  \nElements of Programming Interviews: The Insiders' Guide  \nby Adnan Aziz, Tsung-Hsien Lee, and Amit Prakash  \nCopyright © 2014 Adnan Aziz, Tsung-Hsien Lee, and Amit Prakash. All rights reserved.  \nNo part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form, or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior consent of the authors.  \nThe views and opinions expressed in this work are those of the authors and do not necessarily reﬂect the o􀀎cial policy or position of their employers.  \nWe typeset this book using LATEX and the Memoir class. We used TikZ to draw ﬁgures. Allan Ytac created the cover, based on a design brief we provided.  \nThe companion website forthebook includes contact information and a list of known errors for each version of the book. If you come across an error or an improvement, please let us know.  \nVersion 1.4.4  \nWebsite: [http://ElementsOfProgrammingInterviews.com](http://ElementsOfProgrammingInterviews.com)  \nDistributed under the Attribution-NonCommercial-NoDerivs 3.0 License  \nTable of Contents  \nI The Interview 6  \n1 Getting Ready 7  \n2 Strategies For A Great Interview 11  \n3 Conducting An Interview 18  \n4 Problem Solving Patterns 22  \nII Problems 42  \n5 Primitive Types 43  \n5.1 Compute parity ............................. 43  \n5.2 Compute x=y  ............................ 44  \n5.3 Convert base ............................... 44  \n5.4 Generate uniform random numbers ................. 44  \n5.5 The open doors problem ........................ 44  \n5.6 Compute the greatest common divisor  ............. 44  \n6 Arrays 46  \n6.1 The Dutch national ﬂag problem ................... 46  \n6.2 Compute the max di􀀋erence ...................... 47  \n6.3 Solve generalizations of max di􀀋erence  ............. 47  \n6.4 Sample o􀀏ine data ......","cbCaijfjVVdRrViE","https://ap.wps.com/l/cbCaijfjVVdRrViE","pdf",1125547,191,"English","# The Interview\n## Getting Ready\n## Strategies For A Great Interview\n## Conducting An Interview\n## Problem Solving Patterns\n# Problems\n## Primitive Types\n## Arrays\n## Strings\n## Linked Lists\n## Stacks and Queues\n## Binary Trees\n## Heaps\n## Searching\n## Hash Tables\n## Sorting\n## Binary Search Trees","[{\"question\":\"What is the purpose of this document sample?\",\"answer\":\"It provides examples showing EPI’s organization, content, style, topics, and overall quality.\"},{\"question\":\"Which sections does the table of contents include?\",\"answer\":\"It includes an interview-focused section covering getting ready, strategies, conducting interviews, and problem-solving patterns, followed by a problems section with multiple programming topic areas.\"},{\"question\":\"How is the programming interview content organized in the book sample?\",\"answer\":\"The interview preparation part is structured into numbered subsections, and the problems part is organized by topic chapters with detailed sub-problems.\"}]","Elements of Programming Interviews - The Insiders' Guide - Sampling | PDF",481,[146,150,154,158,162,166,170,174,178,182,186,191,196,201,206,211,216,221,226,230],{"page_no":8,"url":147,"width":148,"height":149},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/4ddc1a6c205f61f317bab8029e7db4cf.webp",983,1415,{"page_no":14,"url":151,"width":152,"height":153},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/413b2c32c1b19e3a61f749ee68d12b94.webp",982,1414,{"page_no":81,"url":155,"width":156,"height":157},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/faeb4dc4fb6fafcd6b4cbf4dc0ac8384.webp",981,1412,{"page_no":19,"url":159,"width":160,"height":161},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/747585e2c98e94860153e16d837a24fc.webp",980,1411,{"page_no":24,"url":163,"width":164,"height":165},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/ca01295be21514b87662eb4131786895.webp",979,1409,{"page_no":29,"url":167,"width":168,"height":169},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/6e5a91d5fbc50d60c13b0d27203d5e04.webp",978,1408,{"page_no":34,"url":171,"width":172,"height":173},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/880e381cc444db76ac0f78fb51c379fd.webp",977,1406,{"page_no":39,"url":175,"width":176,"height":177},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/0a72bfe8db0be8bcd8dcf20f29986c63.webp",976,1405,{"page_no":44,"url":179,"width":180,"height":181},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/465c57cf2dfd302213a4ffbc5e7591e1.webp",975,1403,{"page_no":52,"url":183,"width":184,"height":185},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/f9cb1de04dca58a8e39cf8707b12ab24.webp",974,1402,{"page_no":187,"url":188,"width":189,"height":190},11,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/b268ad0a39899d89f1b20688dfd16eef.webp",973,1401,{"page_no":192,"url":193,"width":194,"height":195},12,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/f210e99b7b4c0503805e9a81d8a65701.webp",972,1399,{"page_no":197,"url":198,"width":199,"height":200},13,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/fd10233fc3ed7df15f4e342e2ebc9368.webp",971,1398,{"page_no":202,"url":203,"width":204,"height":205},14,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/12f7a374eb44e51cedce1d8894af1a8a.webp",970,1396,{"page_no":207,"url":208,"width":209,"height":210},15,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/ccf8277340307082579dc9bf3bd2fafd.webp",969,1395,{"page_no":212,"url":213,"width":214,"height":215},16,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/e5725c8263a24eda8dd02458191ab1fc.webp",968,1393,{"page_no":217,"url":218,"width":219,"height":220},17,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/68062b442e8b26dcca3dac23ea5ea5dc.webp",967,1392,{"page_no":222,"url":223,"width":224,"height":225},18,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/cce8cb7aee45906a338216662e71d1ca.webp",966,1391,{"page_no":56,"url":227,"width":228,"height":229},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/d280a98016ccbec24944c65a0f929f3d.webp",965,1389,{"page_no":46,"url":231,"width":232,"height":233},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-17/0c310b157c36464c799b88306013c75c.webp",964,1388,{"list":235,"token":66},[236,242,248,254,260,266,272,278,284,290],{"doc_id":237,"doc_title":238,"file_type":137,"home_preview_img_url":239,"slug":240,"view_count":207,"category_name":30,"create_tm":241},403651,"Week 1 - Programming Fundamentals - Basics & Conditionals","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229920231890/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796127059&Signature=fT%2Fjo1mUot5ZXIYo63QOC%2FbZUgA%3D","week-1-programming-fundamentals-basics-conditionals",1790542223,{"doc_id":243,"doc_title":244,"file_type":137,"home_preview_img_url":245,"slug":246,"view_count":24,"category_name":30,"create_tm":247},697959,"Cheatcode-Book - How to Prepare for Interviews","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230010142285/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796127059&Signature=O%2BxTLIA13jm44WZscL1wmajZt%2BU%3D","cheatcode-book-how-to-prepare-for-interviews",1794446344,{"doc_id":249,"doc_title":250,"file_type":137,"home_preview_img_url":251,"slug":252,"view_count":81,"category_name":30,"create_tm":253},671623,"Data Structures Cheat Sheet - Time Complexity and Core Properties","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229988381074/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796127059&Signature=WuAyej0ihX4ldWAWo5KbleTzZo8%3D","data-structures-cheat-sheet-time-complexity-and-core-properties",1793577648,{"doc_id":255,"doc_title":256,"file_type":137,"home_preview_img_url":257,"slug":258,"view_count":207,"category_name":30,"create_tm":259},391222,"MBAn Technical Interview Skills Training Workshop - Part 1 - Coding Interview Preparation","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229917369456/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796127059&Signature=2PjQtW5PLWNoegvUTJzjC92h1bc%3D","mban-technical-interview-skills-training-workshop-part-1-coding-interview-preparation",1790350207,{"doc_id":261,"doc_title":262,"file_type":137,"home_preview_img_url":263,"slug":264,"view_count":44,"category_name":30,"create_tm":265},697948,"Data Structures Using Python - R20A0503 - Lecture Notes","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230010141008/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796127059&Signature=YC7sXozYhR379Dxfgp16EFgKAdE%3D","data-structures-using-python-r20a0503-lecture-notes",1794446274,{"doc_id":267,"doc_title":268,"file_type":137,"home_preview_img_url":269,"slug":270,"view_count":29,"category_name":30,"create_tm":271},670910,"Fourth AP Edition - Object-Oriented Programming and Data Structures - Preface xiii","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229988353200/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796127059&Signature=iYEUa4W2xWvxFuK2nYbKtUD3wZ4%3D","fourth-ap-edition-object-oriented-programming-and-data-structures-preface-xiii",1793572671,{"doc_id":273,"doc_title":274,"file_type":137,"home_preview_img_url":275,"slug":276,"view_count":202,"category_name":30,"create_tm":277},491210,"A container library for C - A C container library overview","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229928140490/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796127059&Signature=mDhFMAnMYRoyGXAxFmOTW9qaEQ8%3D","a-container-library-for-c-a-c-container-library-overview",1790846909,{"doc_id":279,"doc_title":280,"file_type":137,"home_preview_img_url":281,"slug":282,"view_count":34,"category_name":30,"create_tm":283},697952,"Python Session 2 - Data Structures","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230010141975/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796127059&Signature=x36hvAV%2F9wWWXDdBt4qA%2BU5Ypnc%3D","python-session-2-data-structures",1794446325,{"doc_id":285,"doc_title":286,"file_type":137,"home_preview_img_url":287,"slug":288,"view_count":192,"category_name":30,"create_tm":289},657557,"Data Structure Diagrams in Typst - CS240E S25 Solara Lin","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975559130/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796127059&Signature=uL33MHXYo0YZogBoGYhu9bJftSw%3D","data-structure-diagrams-in-typst-cs240e-s25-solara-lin",1792982817,{"doc_id":291,"doc_title":292,"file_type":137,"home_preview_img_url":293,"slug":294,"view_count":207,"category_name":30,"create_tm":295},391227,"CRACKING THE CODING INTERVIEW - Coding Interview - Fourth Edition - Book overview","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229917654060/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796127059&Signature=4bsnHMdfqlokEZltJDI%2FpfJZN1Q%3D","cracking-the-coding-interview-coding-interview-fourth-edition-book-overview",1790350217]