├── .DS_Store ├── Gemfile ├── public ├── .DS_Store ├── resources.html ├── contact.html ├── index.html ├── mockinterview.html ├── css │ └── style.css └── whiteboard.html ├── Gemfile.lock ├── config.ru └── README.md /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evagabriela/meetupresources/HEAD/.DS_Store -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | gem 'rack' 4 | gem 'bootstrap-sass', '2.3.2' -------------------------------------------------------------------------------- /public/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evagabriela/meetupresources/HEAD/public/.DS_Store -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | bootstrap-sass (2.3.2.0) 5 | sass (~> 3.2) 6 | rack (1.5.2) 7 | sass (3.2.12) 8 | 9 | PLATFORMS 10 | ruby 11 | 12 | DEPENDENCIES 13 | bootstrap-sass (= 2.3.2) 14 | rack 15 | -------------------------------------------------------------------------------- /config.ru: -------------------------------------------------------------------------------- 1 | use Rack::Static, 2 | :urls => ["/images", "/js", "/css"], 3 | :root => "public" 4 | 5 | run lambda { |env| 6 | [ 7 | 200, 8 | { 9 | 'Content-Type' => 'text/html', 10 | 'Cache-Control' => 'public, max-age=86400' 11 | }, 12 | File.open('public/index.html', File::RDONLY) 13 | File.open('public/mockinterview.html', File::RDONLY) 14 | File.open('public/whiteboard.html', File::RDONLY) 15 | File.open('public/resources.html', File::RDONLY) 16 | File.open('public/contact.html', File::RDONLY) 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | meetupresources 2 | =============== 3 | 4 | #### Description 5 | This website contains study, practice and code challenge material necessary to host an Algorithm and Interview Prep event for women in tech 6 | 7 | (http://meetupresources.herokuapp.com/index.html "Visit the site") 8 | 9 | #### About its Development 10 | HTML5, CSS, Javascript & jQuery 11 | 12 | #### Group Members 13 | * Gaby Zamudio evagabriela[https://github.com/evagabriela] 14 | * Laura Mountamayor laumontemayor[https://github.com/laumontemayor] 15 | * Chantal Emmanuel cemmanuel1[https://github.com/cemmanuel1] 16 | 17 | ##### Here is a screenshot of our coming soon page 18 | 19 | ![image] (https://s3.amazonaws.com/TechWomen.us/meetup_resources_main_screenshot) 20 | -------------------------------------------------------------------------------- /public/resources.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Algorithm & Interview Prep Resources 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 32 | 33 |
34 | 41 |
42 | 43 | 44 | 45 | 46 | 47 |
48 | 49 |
50 |

Additional Resources

51 |

Websites

52 | Code Eval - Solve programming challenges online. 53 |
54 | Karl Mats- Great resource for technical and soft skill questions. 55 |
56 | Interview Tips 57 |

Books

58 | Cracking the Code Interview by Gayle McDowel

59 | 60 | 61 | 62 | 63 |
64 |
65 |
66 | 67 | 68 | -------------------------------------------------------------------------------- /public/contact.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Algorithm & Interview Prep Resources 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 31 | 32 |
33 | 40 |
41 | 42 | 43 | 44 | 45 |
46 | 47 |
48 | 49 | 50 |

Contact Us:

51 | Zoe Madden-Wood 52 |
maddenwood@gmail.com 53 |
@hazmatzo 54 |

55 | Laura Montemayor 56 |
laumontemayor@gmail.com 57 |
@laumontemayor 58 |
Two Girls Code Blog 59 |

60 | Eva Gabriela Zamudio (Gaby) 61 |
gabriela.osu@gmail.com 62 |
@hazmatzo 63 |

64 | Chantal Emmanuel 65 |
cemmanuel1@gmail.com 66 |
@chantalemmanuel 67 |
Two Girls Code Blog 68 | 69 | 70 | 71 |
72 |
73 |
74 | 75 | 76 | -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Algorithm & Interview Prep Resources 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | Fork me on GitHub 27 | 28 |
29 | 30 | 33 | 34 |
35 | 42 |
43 | 44 |
45 | 46 |
47 |

About Us

48 | 49 |

Algorithms and Interview Prep was created to provided women with a space to building up their algorithm and technical interview skills while meeting new friends in the industry and gaining confidence to go out change the ratio.

50 |

The group meets weekly on Mondays at different tech companies througout San Francisco. Participants have a choice of four activities:

51 |
    52 | 53 |
  • Algorithms study group: Design & Analysis Stanford Coursera course
  • 54 |
  • Pair programming
  • 55 |
  • White Boarding: Solving algorithms & technical problems
  • 56 |
  • Mock Interviews: Typically asked technical questions, from behavioral questions to logic and technical knowledge
  • 57 |
58 | Upcoming Events 59 | 60 |

61 | 63 | 64 | 65 |
66 | 67 | 68 | 69 | 70 |
71 |
72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /public/mockinterview.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Algorithm & Interview Prep Resources 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 32 | 33 |
34 | 41 |
42 | 43 | 44 | 45 | 46 | 47 |
48 |
49 |

Behavioral questions

50 |
    51 |
  1. Tell me about yourself.
  2. 52 |
  3. What are your strengths / weaknesses?
  4. 53 |
  5. Why should we hire you?
  6. 54 |
  7. Tell me about a challenging interaction with a teammate.
  8. 55 |
  9. How do you handle pressure?
  10. 56 |
  11. What is your favorite website?
  12. 57 |
  13. What do you like the most and least about working in this industry?
  14. 58 |
  15. What questions do you have for me?
  16. 59 |
60 | 61 |

Base Knowledge questions (technical)

62 |
    63 |
  1. What is clean code?
  2. 64 |
  3. What development tools have you used?
  4. 65 |
  5. What source control tools have you used?
  6. 66 |
  7. Tell me about the project you are most proud of, and what your contribution was.
  8. 67 |
  9. What is MVC?
  10. 68 |
  11. What is OO? - give an example
  12. 69 |
  13. What is an object?
  14. 70 |
  15. What is a class?
  16. 71 |
  17. What is the relationship between an object and a class?
  18. 72 |
  19. What is the difference between arrays and collection?
  20. 73 |
  21. What is the difference between a symbol and a string?
  22. 74 |
75 | 76 |

Technical/Logic questions

77 |
    78 |
  1. Problem: you have two jars, 50 red marbles, 50 blue marbles. you need to place all the marbles into the jars such that when you blindly pick one marble out of one jar, you maximize the chances that it will be red. (when picking, you’ll first randomly pick a jar, and then randomly pick a marble out of that jar) you can arrange the marbles however you like, but each marble must be in a jar.
  2. 79 |
  3. You have three jars that are all mislabeled. one contains peanut butter jelly beans, another grape jelly jelly beans, and the third has a mix of both (not necessarily a 50/50 mix, could be a 1/99 mix or a 399/22 mix). how many jelly beans would you have to pull out, and out of which jars, to find out how to fix the labels on the jars?
  4. 80 |
  5. What is the most efficient way, memory-wise, to store 1 million phone numbers?
  6. 81 |
  7. How do you find the minimum number in a stack of unordered integers?
  8. 82 |
  9. You have 100 doors in a row that are all initially closed. you make 100 passes by the doors starting with the first door every time. the first time through you visit every door and toggle the door (if the door is closed, you open it, if its open, you close it). the second time you only visit every 2nd door (door #2, #4, #6). the third time, every 3rd door (door #3, #6, #9), etc, until you only visit the 100th door. Question: what state are the doors in after the last pass? which are open which are closed?
  10. 83 |
  11. What is the difference between binary search and linear search? Is one always faster than the other? What are the advantages to one over the other?
  12. 84 | 85 | 86 |
87 | 88 | 89 | 90 | 91 |
92 |
93 | 94 | 95 | -------------------------------------------------------------------------------- /public/css/style.css: -------------------------------------------------------------------------------- 1 | 2 | 3 | body { 4 | margin: 0; 5 | background-repeat: repeat; 6 | background-color: #fff; 7 | } 8 | 9 | #container { 10 | width: 1000px; 11 | margin-right: auto; 12 | margin-left: auto; 13 | background-color: #D9D9D9; 14 | } 15 | 16 | #header { 17 | width: 1000px; 18 | height: 80px; 19 | position: relative; 20 | background-color: #fff; 21 | background-repeat: repeat-x; 22 | } 23 | 24 | 25 | #header #title { 26 | 27 | font-family: Arial, Verdana, Geneva, sans-serif; 28 | font-size: 25px; 29 | color: #000; 30 | font-weight: bold; 31 | position: absolute; top: 35px; left:240px; 32 | 33 | } 34 | 35 | 36 | #header #socialIcons { /* This controls the positioning of the social media icons in the header. Feel free to adjust positioning. */ 37 | float: left; 38 | position: absolute; top: 174px; left: 390px; 39 | } 40 | 41 | #header #socialIcons ul { 42 | margin: 0; 43 | padding: 0; 44 | 45 | } 46 | 47 | #header #socialIcons ul li { 48 | float: left; 49 | list-style: none; 50 | padding: 4px 2px; /* This controls the spacing between the social media icons. Feel free to adjust positioning. */ 51 | } 52 | 53 | 54 | #headerBanner { /* This code positions the banner in your header. Right now the banner is commented out so you'll need to go to the index.html file to remove the comment out tags. Edit the index.html to add AdSense code or any image that you'd like. */ 55 | 56 | position: absolute; top: 80px; left: 250px; 57 | 58 | } 59 | 60 | #topMenu { /* This is the menu at the very top of the page. */ 61 | 62 | background: #000; /* Controls background color of entire menu */ 63 | float: left; 64 | width: 100%; 65 | } 66 | 67 | #topMenu ul { 68 | margin: 0; 69 | padding: 0; 70 | 71 | } 72 | 73 | #topMenu ul li { 74 | float: left; 75 | font-size: 12px; 76 | list-style: none; 77 | font-family: "Verdana", "Arial", Helvetica, sans-serif; 78 | border-right: 0px solid #000; /* Change 0px to a higher number to add a border between links. */ 79 | border-bottom: 1px solid #000; /* Controls bottom border color of menu links */ 80 | margin-left: 100px; /* If you don't have enough links to fill up the menu, you can center them horizontally by adjusting the margin-left attribute. */ 81 | padding: 0; 82 | } 83 | #topMenu a { /* Controls the style of the menu links */ 84 | background: #000; /* Controls background color of menu links */ 85 | font-size: 12px; 86 | color: #fff; /* Controls text color of menu links */ 87 | display: block; 88 | float: left; 89 | margin: 0; 90 | padding: 8px 44px; /* Controls spacing between top menu links */ 91 | text-decoration: none; 92 | } 93 | 94 | #topMenu a:hover { 95 | background: #672d67; /* Controls hover color of menu links when you mouseover. Feel free to use the background-image attribute instead! */ 96 | color: #fff; 97 | 98 | 99 | } 100 | 101 | 102 | #topMenu2 { /* Controls the menu below the header */ 103 | 104 | background: #000; /* Controls background color of entire menu */ 105 | float: left; 106 | width: 100%; 107 | position: relative; 108 | /*height: 60px; */ /* If you want to adjust the height of the menu, remove the comment-out tags and adjust the number. You'll also have to adjust the padding in #topMenu2 a if you want the borders between the links to go all the way down. */ 109 | } 110 | 111 | #topMenu2 ul { 112 | margin: 0; 113 | padding: 0; 114 | 115 | } 116 | 117 | #topMenu2 ul li { 118 | float: left; /*you can use display:inline instead which will put space between each link*/ 119 | font-size: 12px; 120 | list-style: none; 121 | font-family: "Verdana", "Arial", Helvetica, sans-serif; 122 | border-bottom: 1px solid #000; /* Controls bottom border color of menu links */ 123 | margin-left: 0px; /* If you don't have enough links to fill up the menu, you can center them horizontally by adjusting the margin-left attribute. */ 124 | padding: 0; 125 | } 126 | #topMenu2 a { 127 | background: #000; /* Controls background color of menu links */ 128 | font-size: 12px; 129 | color: #fff; /* Controls text color of menu links */ 130 | display: block; 131 | border-right: 1px solid #fff; /* Adds a border to separate the links. You may choose to remove this altogether. */ 132 | float: left; 133 | margin: 0; 134 | padding: 8px 44px; /* Controls spacing between top menu links */ 135 | text-decoration: none; 136 | } 137 | 138 | #topMenu2 a:hover { 139 | background: #672d67; /* Controls hover color of menu links when you mouseover */ 140 | color: #fff; 141 | 142 | 143 | } 144 | 145 | 146 | #contentWrapper { /* Do not adjust unless you know what you're doing. This is what helps the content appear ahead of the nav in the source code, which can be helpful for SEO. */ 147 | float: left; 148 | width: 100%; 149 | } 150 | 151 | #content { 152 | margin: 0 100px 0 120px; /* These are the left and right margins for the content area. The 200px represents the right margin, the 120 represents the left. This is what helps space out the area around the main content area. Be careful adjusting these values. */ 153 | background-color: #fff; /* Changes the color of the main content area background */ 154 | border-left: 0px solid #E0E0E0; /* Add a border alongside the content colums by changing the 0 to a number. */ 155 | border-right: 0px solid #E0E0E0; /* Add a border alongside the content colums by changing the 0 to a number. */ 156 | padding-left: 10px; /* Controls spacing around content area */ 157 | padding-top: 20px; /* Controls spacing around content area */ 158 | padding-right: 10px; /* Controls spacing around content area */ 159 | font-family: "Verdana", "Arial", Helvetica, sans-serif; 160 | font-size: 12px; 161 | } 162 | 163 | 164 | .MoreContent p { /* This styles the text below the left nav. */ 165 | font-family: Verdana, Geneva, sans-serif; 166 | color: #000; 167 | font-size: 14px; 168 | line-height: 20px; 169 | 170 | } 171 | 172 | .MoreContent a, .MoreContent a:link, .MoreContent a:visited { /* This styles the links, active links and visited links */ 173 | font-family: "Arial", "Verdana", Helvetica, sans-serif; 174 | color: #000; 175 | text-decoration: underline; 176 | 177 | } 178 | 179 | 180 | .MoreContent a:hover { 181 | color: #C00; 182 | text-decoration: none; 183 | 184 | } 185 | 186 | 187 | #footer { 188 | background-color: #faf7d8; 189 | padding-top: 10px; 190 | clear: both; /* This forces the footer to the bottom of the page. Do not remove this line! */ 191 | 192 | } 193 | 194 | 195 | #footer a { /* Color of footer links. */ 196 | color: #000; 197 | 198 | } 199 | 200 | #footer a.disclaimer { /* Color of footer disclaimer. */ 201 | color: #000; 202 | font-size: 9px; 203 | 204 | } 205 | 206 | #footer a:hover { /* Color of footer links when you mouseover them. */ 207 | color: #672d67; 208 | } 209 | 210 | #footer p { /* Controls footer paragraph text */ 211 | font-family: Verdana, Arial, Helvetica, sans-serif; 212 | font-size: 12px; 213 | line-height: 20px; /* Controls spacing between lines */ 214 | font-weight: bold; 215 | } 216 | 217 | 218 | h1 { /* This styles the H1 tag. */ 219 | font-family: Verdana, Arial, Helvetica, sans-serif; 220 | font-size: 22px; 221 | font-weight: bold; 222 | color: #672d67; 223 | line-height: 24px; 224 | margin-top: 4px; 225 | margin-left: 0px; 226 | } 227 | h2 { 228 | font-family: Verdana, Arial, Helvetica, sans-serif; 229 | font-size: 17px; 230 | font-weight: bold; 231 | color: #5C5B5B; 232 | line-height: 20px; 233 | } 234 | h3 { 235 | font-family: Verdana, Arial, Helvetica, sans-serif; 236 | font-size: 14px; 237 | font-weight: bold; 238 | color: #000000; 239 | line-height: 20px; 240 | } 241 | 242 | p { 243 | font-family: Verdana, Arial, Helvetica, sans-serif; /* This is what controls the paragraph tag text in the body. */ 244 | font-size: 14px; 245 | line-height: 18px; 246 | margin-top: 3px; 247 | margin-right: 0; 248 | margin-bottom: 3px; 249 | margin-left: 0; 250 | padding-bottom: 9px; 251 | } 252 | 253 | 254 | .smalltext { /* This is what controls the small text in the right column. */ 255 | font-family: Verdana, Arial, Helvetica, sans-serif; 256 | font-size: 10px; 257 | padding: 5px; 258 | margin: 3px 0; 259 | line-height: 14px; 260 | } 261 | 262 | a { 263 | color: #672d67; /* This is what controls the link color and style in the body. */ 264 | font-weight: bold; 265 | text-decoration: underline; 266 | } 267 | a:visited { 268 | color: #000000; /* This is what controls the the "visited" links in the body. */ 269 | text-decoration: underline; 270 | font-weight : bold; 271 | } 272 | a:hover { 273 | color: #7A787A; /* This is what controls the the links in the body when you hover with your mouse */ 274 | text-decoration: none; 275 | } 276 | 277 | img { /* Automatically adds padding/spacing around every image. Feel free to add other atributes like border: 1px solid #000; */ 278 | padding: 8px; 279 | 280 | } 281 | 282 | .box1 { /* This controls the look of the box */ 283 | background:#faf7d8; 284 | color: #000; 285 | border:1px solid #672d67; 286 | width: 250px; 287 | height: 120px; 288 | padding-top: 5px; 289 | padding-right: 6px; 290 | font-family: Verdana, Geneva, sans-serif; 291 | font-size: 15px; 292 | padding-bottom: 0; 293 | padding-left: 6px; 294 | line-height: 16px; 295 | } 296 | 297 | #fblike { /* Positions the FB like button for your site over left nav */ 298 | margin: 10px 0 0 42px; /* This spaces the FB like button */ 299 | padding: 0; 300 | display: block; 301 | } 302 | 303 | 304 | .shadow { /* Use this style to add shadows to your elements (header, container, etc.) So in the index.html file just add "class="shadow" inside your
tag. So it will look like this
This will add a shadow around your site container. Adjust colors below. Only works in Chrome, Safari and Firefox, not IE.*/ 305 | -moz-box-shadow: 0 0 3px 5px #999; /* Change the color of the shadow to match your template */ 306 | -webkit-box-shadow: 0 0 30px 5px #999; /* Change the color of the shadow to match your template */ 307 | } 308 | -------------------------------------------------------------------------------- /public/whiteboard.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Algorithm & Interview Prep Resources 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 32 | 33 |
34 | 41 |
42 | 43 | 44 | 45 | 46 | 47 | 48 |
49 | 50 |
51 |
52 |

Tips:

53 |
54 |
    55 |
  • Remember to talk out loud! - Interviewers want to understand how you think and approach problems, so talk out loud while you’re solving problems. Let the interviewer see how you’re tackling the problem, and they just might guide you as well.
  • 56 |
  • Ask Questions- If you're unsure of the parameters of the question or how to proceed, do be afraid to ask questions or for clarification. Here are the overall topics that we are covering in this page:
  • 57 |
58 |
59 | 60 |
61 | "General Algorithms 62 | Arrays, Hashes and Strings 63 | Lists 64 | Stacks and Queues 65 | Trees and Graphs" 66 |
67 |
68 |
69 | 70 |

Roman Numerals

71 |
72 | Write a method that converts an integer to its Roman numeral equivalent, i.e., 476 => 'CDLXXVI'. 73 | For reference, these are the building blocks for how we encode numbers with Roman numerals: 74 | I = 1, V = 5, X = 10, L = 50, C = 100, D = 500, M = 1000 75 | Choose Between 76 | Old-school Roman numerals (no subtraction of 4s and 9s) 77 | 4 = IIII, 9 = VIIII etc. 78 | Modern Roman numerals (subtraction) 79 | 4 = IV, 9 = IX, 14 = XIV, 40 = XL, 44 = XLIV, 90 = XC, 944 = CMXLIV 80 |
81 | 82 |

Pig Latin

83 |
84 | Write a method the takes in a string and returns the pig latin equivalent. Pig Latin takes the first consonant, moves it to the end of the word and places “ay” at the end. If the string starts with a consonant do nothing. 85 | “pig” = “igpay”, “banana” = “ananabay” 86 |
87 | 88 |

Shuffle

89 |
90 | Without using a shuffle or sort write your own shuffle method for an array. The method will take an array and returns a new array with all of the elements in a random order. One important property of a good shuffle method is that every permutation is equally likely. 91 |
92 | 93 |

Anagrams

94 |
95 | 96 | An anagram is a word formed by rearranging the letters of another word, e.g., iceman is an anagram of cinema. 97 | 98 | We're going to write a method called anagrams_for that takes as its input a word and an array of words, representing a dictionary, and returns an array consisting of all the anagrams of the input word. 99 | 100 | anagrams_for should return an empty array ([]) if no anagrams are found in the dictionary. You don't have to worry about the order of the returned Array. 101 |
102 | 103 |

Factorial

104 | 105 |
106 | 107 | Write a recursive and iterative solution for a finding the factorial of a number. If you don't remember, the factorial of a non-negative integer n, denoted n! is the product of all positive integers less than . For example, 5! = 5 * 4 * 3 * 2 * 1 108 |
109 | 110 |

Binary vs. Linear Searching

111 |
112 | 113 | Write an example demonstrating Binary Search. 114 | Write an example demonstrating Linear Search. 115 | 116 | Hint: A linear search looks down a list, one item at a time, without jumping. In complexity terms this is an O(n) search - the time taken to search the list gets bigger at the same rate as the list does. 117 | 118 | A binary search is when you start with the middle of a sorted list, and see whether that's greater than or less than the value you're looking for, which determines whether the value is in the first or second half of the list. 119 |
120 | 121 | 122 |

Fibonacci

123 |
124 | Implement an iterative version of the Fibonacci sequence which take an integer n as input and returns the nth Fibonacci number. 125 | 126 | Implement a recursive version of the Fibonacci sequence which take an integer n as input and returns the nth Fibonacci number. 127 | 128 | In mathematics, the Fibonacci numbers or Fibonacci series or Fibonacci sequence are the numbers in the following integer sequence:[1][2] 129 | 0,1,1,2,3,5,8,13,21,34,55,89,144 130 | By definition, the first two numbers in the Fibonacci sequence are 0 and 1, and each subsequent number is the sum of the previous two. 131 | In mathematical terms, the sequence Fn of Fibonacci numbers is defined by the recurrence relation 132 | F_n = F_{n-1} + F_{n-2} 133 |
134 | 135 |

Apple Stock

136 |
137 | I have an array stockPricesYesterday where the keys are the number of minutes into the day (starting with midnight) and the values are the price of Apple stock at that time. For example, the stock cost $500 at 1am, so stockPricesYesterday[60] = 500. 138 |
139 | Write an efficient algorithm for computing the best profit I could have made from 1 purchase and 1 sale of an Apple stock yesterday. 140 |
141 | 142 |

Arrays

143 |
Implement an algorithm to determine if a string has all unique characters. What if you cannot use additional data structures? 144 |
145 | 146 |
147 |
Write code to reverse a C-Style String. (C-String means that “abcd” is represented as five characters, including the null character.)
148 |
149 |
Design an algorithm and write code to remove the duplicate characters in a string without using any additional buffer. NOTE: One or two additional variables are fine. An extra copy of the array is not. Write the test cases for this method.
150 | 151 |
Write a method to decide if two strings are anagrams or not.
152 | 153 | 154 |

Lists

155 |
Implement an algorithm to delete a node in the middle of a singly linked list, given only access to that node. 156 | 157 | EXAMPLE 158 | 159 | Input: the node ‘c’ from the linked list a->b->c->d->e 160 | Result: nothing is returned, but the new linked list looks like a->b->d->e 161 | 162 |
163 |
164 |
You have two numbers represented by a linked list, where each node contains a single digit. The digits are stored in reverse order, such that the 1’s digit is at the head of the list. Write a function that adds the two numbers and returns the sum as a linked list. 165 | 166 | EXAMPLE 167 | Input: (3 -> 1 -> 5) + (5 -> 9 -> 2) 168 | Output: 8 -> 0 -> 8 169 |
170 | 171 |
172 |
173 | Given a circular linked list, implement an algorithm which returns node at the beginning of the loop. 174 | Circular linked list: A (corrupt) linked list in which a node’s next pointer points to an earlier node, so as to make a loop in the linked list. 175 | 176 | EXAMPLE 177 | input: A -> B -> C -> D -> E -> C [the same C as earlier] 178 | output: C 179 |
180 | 181 |
182 |
183 | Given two different lists of objects, come up with an efficient solution to find the intersection of the two lists. 184 |
185 | 186 |

Trees

187 |
188 | Implement a function to check if a tree is balanced. For the purposes of this question, a balanced tree is defined to be a tree such that no two leaf nodes differ in distance from the root by more than one. 189 |
190 |
191 |
Given a directed graph, design an algorithm to find out whether there is a route between two nodes.
192 |
193 |
Given a sorted (increasing order) array, write an algorithm to create a binary tree with minimal height.
194 |
195 |
Given a binary search tree, design an algorithm which creates a linked list of all the nodes at each depth (i.e., if you have a tree with depth D, you’ll have D linked lists).
196 | 197 | 198 |

Stacks

199 |
In the classic problem of the Towers of Hanoi, you have 3 rods and N disks of different sizes which can slide onto any tower. The puzzle starts with disks sorted in ascending order of size from top to bottom (e.g., each disk sits on top of an even larger one). You have the following constraints: 200 | 201 | (A) Only one disk can be moved at a time. 202 | (B) A disk is slid off the top of one rod onto the next rod. 203 | (C) A disk can only be placed on top of a larger disk. 204 |
205 | 206 | 207 |
208 |
209 | 210 |
211 | 212 | Write a program to move the disks from the first rod to the last using Stacks. 213 |
214 | 215 |
216 |
217 | Write a program to sort a stack in ascending order. You should not make any assumptions about how the stack is implemented. The following are the only functions that should be used to write this program: push | pop | peek | isEmpty. 218 |
219 | 220 | 221 | 222 |
223 | 224 |
225 | 226 | 227 | 228 | 229 |
230 |
231 | 232 | 233 | --------------------------------------------------------------------------------