Skip to content

Instantly share code, notes, and snippets.

View theapprenticewizard's full-sized avatar

Raymond Dinkin theapprenticewizard

View GitHub Profile
@theapprenticewizard
theapprenticewizard / StringReversal.java
Last active May 16, 2019 00:49
Reverse a string in java with linear time complexity and constant space complexity by using a StringBuffer.
public class Solution {
public static String reverse(StringBuffer input) {
StringBuffer buffer = new StringBuffer(input);
final int len = (input.length() / 2);
for (int i = 0; i < len; i++) {
swap(buffer, i, input.length()-i-1);
}
return buffer.toString();
new Vue({
el: '#exercise',
data: {
effectsStarted: false,
effectsToggle: false,
sad: 'sad',
unhappy: 'unhappy',
classes: [],
styles: [],
classActive: true,
package io.github.theapprenticewizard.twilliokata.controller;
import com.twilio.twiml.*;
import com.twilio.twiml.messaging.Body;
import com.twilio.twiml.messaging.Message;
import com.twilio.twiml.voice.Gather;
import com.twilio.twiml.voice.Say;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;