Code Monkey home page Code Monkey logo

alphaws1's Introduction

#Alpha Camp Week 1 Exercise Summary

  1. Exercise 4: Valid Anagram: Given two strings s and t, write a function to determine if t is an anagram of s.

  2. Exercise 5: Majority Element: Given an array of size n, find the majority element. The majority element is the element that appears more than โŒŠ n/2 โŒ‹ times.

  3. Exercise 6: Remove Duplicates from Sorted Array: Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.

  4. Exercise 7: Ugly Number: Write a program to check whether a given number is an ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For example, 6, 8 are ugly while 14 is not ugly since it includes another prime factor 7.

  5. Exercise 8: Single Number 2: Given an array of integers, every element appears three times except for one, which appears exactly once. Find that single one.

  6. Exercise 9: Best Time to Buy and Sell Stock II: An algorithm to find the maximum profit

  7. Exercise 10: Search Insert Position: A sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.

alphaws1's People

Contributors

ngerald51 avatar

Watchers

James Cloos avatar  avatar

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.