220 likes | 333 Views
Reminders. Facebook: ACM at UCF Vote in the Windows 8 poll! Website: www.cs.ucf.edu/~acm Dues: $5 per semester or $10 total. Google & Microsoft. Monday 9/24 Google AMA 11am-1pm, HEC 101 Google Street View Tech Talk 6pm-7:30pm, HEC 101 Microsoft Resume & Interview Prep 8pm, HEC 101.
E N D
Reminders • Facebook: ACM at UCF • Vote in the Windows 8 poll! • Website: www.cs.ucf.edu/~acm • Dues: $5 per semester or $10 total
Google & Microsoft • Monday 9/24 • Google AMA • 11am-1pm, HEC 101 • Google Street View Tech Talk • 6pm-7:30pm, HEC 101 • Microsoft Resume & Interview Prep • 8pm, HEC 101
Google & Microsoft • Tuesday 9/25 • Microsoft Office Hours • 10am–11:30pm, HEC Atrium • 1:30pm –3pm, HEC Atrium • Google Internal Technology Residency Program Info Session • 6pm-7:30pm, HEC 101
Microsoft • Wednesday 9/26 • UCF Career Expo • 10am-2pm, UCF Arena • Formal Dress Required • Microsoft Tech Talk: Always connected - Scaling to Reach a Global Audience • 6:30pm, HEC 119
Attend these events! • Great networking opportunities! • Meet recruiters and alum • Free food and swag! • T-shirts, stickers, and more
Agenda • Interview types • Interview Process • What to review • How to approach a problem • Resources • Sample problems
Interview Types • Different for every company • Coding • Write a function that does X • Technical • What is a pointer? • Behavioral • What is the biggest challenge you’ve overcome? • Design • Design a backpack
Interview Process • Resume screen • Phone interview • 1 or more, 45min – 1hour • 1-2 questions • On campus interview • Upwards 5-6 • Depends on company
What to review? • Basic data structures -- CS1 • Arrays, Linked Lists, Stacks, Queues, Trees, Graphs, Hash Tables • How to implement • Run time of different operations • Find • Insert • Delete
How to approach a problem • Coding Question: • Understand the question • Test cases • Pseudo code solution • Code solution • Test code with test cases
How to approach a problem • Coding Question: • Communicate • Think out loud • Thought process >= Correct solution
Example • Write a function that determines if an integer is a power of 2 • Bad • Good
Bad • Public booleanPowerOfTwo(int n){ if(n <= 0) return false; return (n & (n-1)) == 0; }
Bad? Why? • Solution is great! • Bad • Didn’t communicate thought process • Didn’t derive the solution • Didn’t test • Skeptical • seen question before & remember answer?
Good • Powers of 2 means 2n • positive values only • Examples: • valid: 20=1, 21=2, 22 =4 • invalid: 3, 5, 7, 12 • Use binary operations? • 1= 1 3 = 11 • 2 = 10 5 = 101 • 4 = 100 7 = 111 • 8 = 1000 12 = 1100
Good • Notice, powers of two have only 1, 1 bit • Simple solution: • count all 1 bits • if > 1 return false, else true • How do I ‘count all 1 bits’ • Mod value by 2 – gives me last bit
Good • Public booleanPowerOfTwo(int n){ int count = 0; if(n<=0) return false; while(n > 0){ count += n % 2; if(count > 1) return false; n = n >> 1; } return true; }
Good -1 0 1 12 32 232 Public booleanPowerOfTwo(int n){ int count = 0; if(n<=0) return false; while(n > 0){ count += n % 2; if(count > 1) return false; n = n >> 1; } return true; }
Resources • Programming Interviews Exposed • ISBN: 978048121672 • Glassdoor.com • Careercup.com • Company’s website