摘要:
Steve has a string of lowercase characters in range ascii[‘a’..’z’]. He wants to reduce the string to its shortest length by doing a series of operati 阅读全文
摘要:
class Solution {public: int removeElement(vector<int>& nums, int val) { if(nums.size()==0) return nums.size(); int count=0; for(int i=0;i<nums.size(); 阅读全文
摘要:
public: int removeDuplicates(vector<int>& nums) { int size=nums.size(); if(size<=1) return size; int cnt = 1; for (int i = 1; i < nums.size();i++) { i 阅读全文
摘要:
class Solution { // Hash table that takes care of the mappings. private HashMap<Character, Character> mappings; // Initialize hash map with mappings. 阅读全文