Dave: Eject your modus and set it to Scrabble values.

seen from Germany
seen from China
seen from United States
seen from Singapore

seen from Singapore

seen from Australia

seen from T1
seen from United States

seen from United States

seen from United States
seen from United Kingdom

seen from Singapore

seen from United States
seen from Singapore
seen from France
seen from Malaysia

seen from Poland

seen from Malaysia

seen from Türkiye
seen from United States
Dave: Eject your modus and set it to Scrabble values.

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
Given a dictionary and a list of letters find all valid words that can be built with the letters
Given a dictionary and a list of letters find all valid words that can be built with the letters
package dsProblem; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * Created by gyaneshwar on 26/11/2016. */ public class DictionaryWithChar { List dictionary; char[] characters; Map alphabet; public DictionaryWithChar(List dictionary, char[] ch) { this.dictionary = dictionary; this.characters = ch; this.alphabet = new HashMap();…
View On WordPress
W2D5 - Sea Cave Mercury
I continued to feel unwell, so I wore a face mask today. If you didn't know, you could've mistaken me for a surgeon... but I ain't the App Academy.. operator!!
Due to feeling sick though, I ended up sleeping very poorly, due to waking up at 4 and being unable to sleep till 6. :(
The day started with study hall, and I went over the broken assessment and got it to eventually pass. I also started to ponder how to create Freecell in terms of our assessment. One thing I feel they'll have us do:
Get a card from one of the stacks.
Check if that card is the last in the stack array.
If it isn't, iterate to the end and make sure the stack is in descending order by 1, and that the colors alternate.
Make sure that the number of cards being moved isn't more than the number of FreeCells left.
That is just speculative of course, so I'll see whether or not they do give that to us as part of our test.
No lecture today, and we got straight into creating our own hash map. I was hoping we would get one, but I guess there's going to be variances throughout. Next Friday for example, we are going to have a solo day, so no pairing, but we'll also have Happy Hour again, for those who love beer.
We had to start by creating simpler sets. We started with IntSets, and had to go all the way to creating Linked Lists, a Hash Map, then finally, a LRU - Least Recently Used cache.
My partner was helpful today, and seemed to be very good at explaining things to me in a way that allowed me to understand fairly quickly, given my usual slow mental process. This helped especially when we got to Linked Lists, which threw me off the same way TreeNodes did a week ago, and we made good progress I feel. We got to Phase 5 of 6, and couldn't make it to the last one because we got stuck on a bug with our Linked List and Hash Map. The way our Linked List was set up, when it reassigned a @head, it never bothered reassigning it to its next. This resulted in us getting nil for one of our Links, and by the time we were starting to come to figure it out, it was time for Friday's circle group.
In this group session, we talked a little about diversity. Interestingly enough, I think our group was the most diverse out of the four, but we didn't have very much to say on the topic itself. I did throw in that my previous internship was basically just minorities, and it was one of the best experiences I've had at a job to date. But there wasn't a whole lot of discussion on the matter, but I wonder what the other groups said in regards to it.
Next week, we're starting SQL. I think based on what I've heard, most of us are going to be going into SQL completely blind, and I've also heard people express they liked this, because then we'd all start on the same level. I feel like I'll still end up feeling like the weakest link. :0(
More importantly, our assessment is Monday. I have plans to go to the gym and then A/A tomorrow, but we'll see what happens. I'll keep wearing my mask to make sure I'm not spreading anything, and the environment should help make studying easier. As my partner from this Wednesday said, it's better to come in Saturday than Sunday since if I'm going to need more polishing up, having that extra day is better than having none.
Good night.
App Academy: Week 2, Day 5
The magic behind hash maps' O(1) insertion, deletion, and search times was finally dispelled today. By using an array as the underlying structure to store buckets of doubly-linked lists, I learned how to build a fully funcitonal hash map. First, I wrote a hash function using the XOR bitwise operator to generate a function with a good, deterministic distribution of keys for strings, arrays, and hashes themselves. Then, I wrote a Hash class that starts out with a small array of buckets that doubles in size each time the number of elements in the hash exceeds the number of buckets. Each time a new key-value pair is inserted into the hash, the key given by the aforementioned hash function is modded by the length of the underlying array, providing the hash map with an index into which to push a link storing the new key-value pair.
Buildling on this hash map, I also learned how to build a least recently used (LRU) cache. An LRU cache stores key-value pairs where the key is some costly operation and the value is the result of that operation. The idea is to store a small number of such pairs for operations that are frequently required; by storing the result of such a compuation in a hash once we've already computed it, we can then simply look up the value associated with the key provided by the operation itself when we need the result again, thereby providing us with the result of the operation in O(1) time without having to actually compute it again, saving our program a great deal of time.
However, since the number of operations a program or CPU computes is huge, we can only store a limited number of such key-value pairs in our LRU cache. Thus, when the number of such pairs in our cache exceeds the cache's maximum size, we simply throw-out the least recently-used pair (hence the name "least recently used cache"). To achieve a structure with all the aforementioned properties, I stored the key-value pairs in a doubly-linked list and stored references to each of the links within a hash map. This way, we can achieve O(1) search time for our linked list, since we can simply look up, in our hash, the reference to the link we want in O(1) time rather than having to iterate through each link in the list itself. When a new operation is computed, a link storing its key-value pair is put on the front of the list and a mapping of its key to that link is added to the hash map. If an operation already in the linked list is used again, we move that link to the front of the list. And if the list exceeds its maximum length, we simply remove the last (and thus least recently-used) link from the list and remove its key-value pair from the hash map.
Last, I learned how to implement a dynamic array (which is included in Ruby by default) by using only static arrays as the underlying data structures. Seeing how much needs to be accounted for in the various methods that Ruby includes by default in its Array class made me really appreciate how much time can be saved and how many programming possibilities are opened-up by first building-up such flexible data structures.
Remove duplicate character from a given string program in c++
Remove duplicate character from a given string program in c++
There are many way to write a program to solve a problem. removing duplicate character from a given string can also solve in many way with different time and space complexity. I have written three functions which can be used to solve this. 1. Using simple brute force method with time complexity: O(n^2) space complexity: O(1) 2. First sort the string and then remove the duplicate character with…
View On WordPress

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
W2D5 - Hash Maps
Hashes
This Friday we created our own hash map data structure. I’ve always heard that hashes are amazing because they can set and access their elements in O(1) time. I finally learned how that works. Actually, sometimes when you insert an element into a hash, the time taken will be proportional to the number of elements in the hash. As your number of elements increases, this case occurs less and less often. The occurrence is rare enough that the average (amortized) time does not depend on the number of elements n.
Hash Functions
A hash uses a hash function in order to get a uniform distribution of elements into the “buckets” where they are stored. The hash function must have several properties. It should output data that is
deterministic
uniformly distributed
unpredictable
highly sensitive (opposite of a continuous function)
This basically means that if the input is 2 I will get the exact same crazy thing like “d81e3f” every time (deterministic yet unpredictable), and if the input is 3 (very close to 2) I will get something like “947a2b” (uniformly distributed and highly sensitive). Sometimes you also want a hash function to have other properties too. You may want it to be fast, for example. You may even want it to be slow for use in cryptography.
The Results
My pair and I played with a few different combinations of operations until we successfully built a hash function that satisfied most of these properties. Our function did fail to be highly sensitive in one way (swapping two elements of an array and hashing yields the negative of the original hashed array). Besides this, it behaves very well. Using a linked list and a few other structures, we built our hash map.
W2D4 - Theta and Data
Math Day
We wandered into some mathematical territory today. It’s comforting to be back here on familiar ground. Starting algorithms and data structures this early in the curriculum is new with our cohort. We saw some “epsilon-delta”-ish definitions today, and we’re only mid-way through week 2! Then again, they have selected a talented group, and it looks like most people are able to understand it and apply it in the exercises. I can tell that the App Academy instructors and T.A’s are excited about the change.
Anagrams
This afternoon, my pair and I wrote 4 different versions of a method to check whether two words are anagrams. As per the instructions, we started with an inefficient implementation, and wrote progressively more efficient versions. The first was not only the worst, but also the most difficult to write. For this version, we used both iteration and recursion to create a list of all possible anagrams for a given word, then check the list for inclusion of the second word. Of course, there are n! ways to arrange the letters of a word without repeats...if you've ever looked at a graph of the factorial function (or the Gamma function) superimposed on a graph of a quadratic or even an exponential function, you'll know that's bad.
The final version used a hash, which has constant time 'get' and 'set' methods. I'm not quite sure how that works. We'll be implementing a hash map tomorrow, so I'll find out!
Reversing a sha1sum resembles reversing a pie. Even if you know how much eggs has the baker put in it the best you can do is trying to bake exactly the same pie
Li0liQ