Giter VIP home page Giter VIP logo

careercup's Introduction

CareerCup

Solving interview questions for fun and profit!

careercup's People

Contributors

ghostsquad avatar

Watchers

 avatar  avatar

careercup's Issues

Contains Method

Implement a contains method that operates in less than O(n) time.

Phonepad Puzzle

http://faculty.edcc.edu/paul.bladek/CS132/p2.htm

This numerical puzzle originates from the Turkish Intelligence Foundation sent to Will Shortz by Turkish puzzler Metin Orsel. Start with a certain number on a telephone keypad. Move to another number adjacent to it horizontally, vertically or diagonally. Then move to another number adjacent to that one horizontally, vertically or diagonally. And keep doing this until you have 9 digits. All the digits must be different. That is, you'll use 9 of the 10 digits on the phone including zero (0) and the path must not cross itself. When you're done, the number formed by the first 3 digits plus the number formed by the next 3 digits will equal the/ number formed by the last 3 digits. There's only one path that reaches this solution. What is it?
1++2++3
4++5++6
7++8++9
+++0+++
It turns out that there are actually two correct solutions. If you did not have the restriction of no crossed paths, there would be three solutions.

Word Soup

Given an Array of Arrays, return true/false if a given word exists within the "soup".

Directions that should be allowed
Left->Right
Top->Bottom
UpperLeft->LowerRight

Search word can be smaller than total height/length of array.

find "hello" below

a b h f k
w z e c s
h e l w o
u f l n m
o y o h h

PreOrder, InOrder, PostOrder

Given a sequence of numbers, defined as the PreOrder, InOrder, and/or PostOrder traversal of a binary tree. Recreate the tree.

Example:
PreOrder 7,10,4,3,1,2,8,11
InOrder 4,10,3,1,7,11,8,2

Resulting Binary Tree:

                             ---- 7 ----
                         /                 \
                      10                    2
                     /   \                /
                    4     3              8
                             \          /
                               1       11

Traversal Definitions Here:
http://en.wikipedia.org/wiki/Tree_traversal

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.