Code Monkey home page Code Monkey logo

Louie Shi's Projects

anyfunction icon anyfunction

Returns the first location in the string s1 where any character from the string s2 occurs, or -1 if s1 contains no characters from s2.

check-permutation icon check-permutation

Given two strings, write a method to decide if one is a permutation of the other.

fahrtocels icon fahrtocels

Program that converts Fahr to Celsius using a function call.

hextointeger icon hextointeger

This code converts a hexadecimal number (0xABCD or ABCD) to its respective integer.

intersection icon intersection

Given two (singly) LinkedLists, determine if the two lists intersect. Return the intersecting node.

invertspecificbits icon invertspecificbits

Returns x with the n bits that begin at position p inverted, leaving the others unchanged.

kth-to-last icon kth-to-last

Implement an algorithm to find the kth to last element of a singly/doubly linked list.

longestuniquesubstring-brute-force- icon longestuniquesubstring-brute-force-

Given a string, find the length of the longest substring without repeating characters. I used the brute force method, which is extremely bad when the length of the unique substring is long. (TIME WILL EXCEED)

modifiedsqueeze icon modifiedsqueeze

Deletes each character in s1 that matches any character in the string s2

removetrailingblanks icon removetrailingblanks

Remove trailing blanks and tabs from each line of input, and to delete entirely blank lines

reverse icon reverse

Reverses character string s (Pointer and Non-Pointer Versions)

setbits icon setbits

Returns x with the n bits that begin at position p set to the rightmost n bits of y, leaving the other bits unchanged.

stackmin-uses-more-space- icon stackmin-uses-more-space-

How would you design a stack which, in addition to push and pop, has a function min which returns the minimum element? Push, pop, and min should all operate in O(1) time. (THIS IS BAD when we have a large stack because we have to keep track of the min value for every single element).

sum-lists icon sum-lists

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.

twosum icon twosum

Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution, and you may not use the same element twice.

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.