Skip to content

Instantly share code, notes, and snippets.

@story645
story645 / hw4_readme.md
Last active May 23, 2019 17:12
HW4 Readme

Using the linked list class from homework 3, implement a stack class with the following methods:

  1. push
  2. pop
  3. top

Then use that stack to solve the following problem:

Suppose that you have n queens from a chessboard. Is it possible to place all n queens on the board so that no two queens are in the same row, no two queens are in the same column, and no two queens are on the same diagonal?

# packages in environment at /opt/tljh/user:
#
# Name Version Build Channel
absl-py 0.5.0 <pip>
alembic 1.0.0 <pip>
amqp 2.3.2 <pip>
appdirs 1.4.3 py_1 conda-forge
argon2-cffi 18.3.0 <pip>
asn1crypto 0.24.0 py36_0
astor 0.7.1 <pip>
import twitter
OAUTH_TOKEN = ""
OAUTH_SECRET = ""
CONSUMER_KEY = ""
CONSUMER_SECRET = ""
twitter_stream = twitter.TwitterStream(
auth=twitter.OAuth(OAUTH_TOKEN, OAUTH_SECRET,
CONSUMER_KEY, CONSUMER_SECRET)
Test of something strange <img src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxQQEhUUEhQWFRUXGBcaFxgYGBcYHBwbFRgYGRgXGCAaHSggHR4lGxggITEiJSkrLi8wGx8zODMtNygtLisBCgoKDg0OGxAQGy8kICU0LC80NDQ0NCwvNzQsLCwsNCwsLCwsNCwsLCwsLCwsLCwsNCwsLCwsLCwsLDQsLCwsLP/AABEIAOEA4QMBEQACEQEDEQH/xAAbAAACAwEBAQAAAAAAAAAAAAAABgMFBwQCAf/EAEoQAAIBAwIEAwUEBwMJBwUAAAECAwAEERIhBQYxQRMiUQcyYXGBFFKRoSNCYnKx0fAzNMEVJENTc4KSovFEk5Sys9LhFjZUhNP/xAAcAQABBQEBAQAAAAAAAAAAAAAAAgMEBQYBBwj/xAA5EQABAwIEAgcHAwQCAwAAAAABAAIDBBEFEiExQVETImFxgZHwBjKhscHR4RRCUhUjM/EWNJKisv/aAAwDAQACEQMRAD8A3GhCKEIoQihCKEIoQihCKEIoQihCKEIoQihCKEIoQihCKEIoQihCKEIoQihCKEIoQihCKEIoQihCKEIoQihCKEIoQihCKEIoQihCKELnu72OLHiOq56Ancn0UdSflXCQN0Kvl42SP0cTH0aQiJe/UHMg6fc7io0lbDHuU62F7tguObikpz+kRRvsiZI9DqckH/h/+a2TG42+6FIbROO65ZLotnVJM2e+vRtjoPCC4+fXfr0qE/HH/tCeFCOKi8X4zf8AiJ//AH1H/rEyc/RsR4n7U3/iJ/8A30f1iZH6Ni+pNg51Tf8AfzH07M5HalNxqYLho2KaPiEq+7O/Q4DqjgenQKxx8WyfXO9So8dP7gm3UPJdkPG5QfMiSDuUJRvhhXyP+cdPpU6LGIX76Jh1I8bLsg4/C2A5MTHG0o07nOAG9xjt0VjVjHPHJ7jrqO5jm7hWlPJCK