原创 【Leetcode Shell】Transpose File

題目: Given a text file file.txt, transpose its content. You may assume that each row has the same number of columns

原创 【Leetcode Database】Delete Duplicate Emails

題目: Write a SQL query to delete all duplicate email entries in a table named Person, keeping only unique emails ba

原创 【Leetcode Shell】Word Frequency

題目: Write a bash script to calculate the frequency of each word in a text file words.txt. For simplicity sake, you m

原创 【Leetcode Shell】Valid Phone Numbers

題目: Given a text file file.txt that contains list of phone numbers (one per line), write a one liner bash script to

原创 【Leetcode Database】Duplicate Emails

題目: Write a SQL query to find all duplicate emails in a table named Person. +----+---------+ | Id | Email | +----+-

原创 【Leetcode Database】Employees Earning More Than Their Managers

題目: The Employee table holds all employees including their managers. Every employee has an Id, and there is also a c

原创 【Leetcode Algorithm】Valid Parentheses

Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is

原创 【Leetcode Shell】Tenth Line

題目: How would you print just the 10th line of a file? For example, assume that file.txt has the following content:

原创 【Leetcode Database】Combine Two Tables

問題: Table: Person +-------------+---------+ | Column Name | Type    | +-------------+---------+ | PersonId    | int    

原创 【Leetcode Algorithm】Reverse Linked List

Reverse a singly linked list. Hint: A linked list can be reversed either iteratively or recursively. Could you imple

原创 Matlab仿真AF-MIMO-Relay筆記

今天開始在CSDN寫博客了~ 最近一直在忙着搞仿真,主要是關於中繼放大轉發的,從兩個月前什麼都不會的小白,到現在有了入門的喜悅,真是付出纔會有回報啊! 這些天搞科研的收穫是: 1、一定要認真。 剛開始查了大量資料,和學長反覆論證推敲,有了

原创 【Leetcode Algorithm】Remove Nth Node From End of List

題目: Given a linked list, remove the nth node from the end of list and return its head. For example, Given linked

原创 【Leetcode Algorithm】Merge Two Sorted Lists

Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes

原创 【Leetcode Algorithm】Contains Duplicate

題目: Given an array of integers, find if the array contains any duplicates. Your function should return true if any valu

原创 鏈表反轉的四種方法分析

關於反轉鏈表的總結: 反轉鏈表的方式有很多,現在介紹四種: 非遞歸的: 從圖中可以看到,對n個節點的反轉,方法一指針指向改變了2^(n-1)次,還有一個額外的節點,而方法二用了2^(n-1)次,卻沒有增加額外節點。方法三既沒有增